You need to sign in to do that
Don't have an account?

Batch size not working
Hi,
I can't seem to change the batch size on my select calls. Could someone make a sanity check here to make sure I haven't made a silly mistake.
I'm trying to set the batch to 25 and I keep getting back 113 records.
I'm also using compression which I doubt is the cause of anything,
Thanks!
Jon
Java code:
QueryOptions qo = new QueryOptions();
qo.setBatchSize(new Integer(25));
binding.setHeader(new SforceServiceLocator().getServiceName().getNamespaceURI(), "QueryOptions", qo);
QueryResult selectResult = null;
try {
selectResult = binding.query(sql);
SOAP message:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<ns1:SessionHeader soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xmlns:ns1="SforceService">
<ns2:sessionId xmlns:ns2="urn:partner.soap.sforce.com">left out of posting</ns2:sessionId>
</ns1:SessionHeader>
<ns3:QueryOptions soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xmlns:ns3="urn:partner.soap.sforce.com">
<ns3:batchSize>25</ns3:batchSize>
</ns3:QueryOptions>
</soapenv:Header>
<soapenv:Body><query xmlns="urn:partner.soap.sforce.com">
<queryString>Select Id, Name, ParentId from Account </queryString></query>
</soapenv:Body>
</soapenv:Envelope>
I can't seem to change the batch size on my select calls. Could someone make a sanity check here to make sure I haven't made a silly mistake.
I'm trying to set the batch to 25 and I keep getting back 113 records.
I'm also using compression which I doubt is the cause of anything,
Thanks!
Jon
Java code:
QueryOptions qo = new QueryOptions();
qo.setBatchSize(new Integer(25));
binding.setHeader(new SforceServiceLocator().getServiceName().getNamespaceURI(), "QueryOptions", qo);
QueryResult selectResult = null;
try {
selectResult = binding.query(sql);
SOAP message:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<ns1:SessionHeader soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xmlns:ns1="SforceService">
<ns2:sessionId xmlns:ns2="urn:partner.soap.sforce.com">left out of posting</ns2:sessionId>
</ns1:SessionHeader>
<ns3:QueryOptions soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xmlns:ns3="urn:partner.soap.sforce.com">
<ns3:batchSize>25</ns3:batchSize>
</ns3:QueryOptions>
</soapenv:Header>
<soapenv:Body><query xmlns="urn:partner.soap.sforce.com">
<queryString>Select Id, Name, ParentId from Account </queryString></query>
</soapenv:Body>
</soapenv:Envelope>
I swore I tore through the API doc and didn't see a mention of a minimum batch size.
Just to pick at it, SF might want to take out the examples that refer to setting the batch size to 3 then :smileywink:
Thanks AGAIN!
Jon
Is there a mailing list or something that lets you know when the API docs are updated?
Thanks.
jon