So I have a C# program that does an automated backup of all custom objects in are org in the login method which I have posted below I set the querybatch size
private bool login()
{
try
{
binding = new SforceService();
binding.Timeout = 180000;
lr = binding.login("username", "password+token");
binding.Url = lr.serverUrl;
binding.SessionHeaderValue = new SessionHeader { sessionId = lr.sessionId };
binding.QueryOptionsValue = new SforceBackup.QueryOptions();
binding.QueryOptionsValue.batchSize = 50;
binding.QueryOptionsValue.batchSizeSpecified = true;
return true;
}
catch (SoapException e)
{
Console.WriteLine(e.Message);
using (StreamWriter writer =
new StreamWriter("somefile", true))
{
writer.WriteLine(e.Message);
}
}
return false;
}
Later in my code i build an sqlbody and query it with the following line
QueryResult qr = binding.queryAll("Select " + sqlbody + "From " + objectname + " where isdeleted=false");
But when I set the Sobject array to sObject[] records = qr.records; it alway returns 200 records
****Note the whole program runs to completion but occasionally times out with some larger objects (800 fields) in are org on this line ***
qr = binding.queryMore(qr.queryLocator);
So I figure if I can set the batchsize it should take care of the problem but no matter where I set it in the program I get 200 records return(I checked the stack with a breakpoint and its being set there).
**Note not interested in Salesforce weekly backup or anything on the appexchange.