function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
bill hayhowbill hayhow 

Error looping through queryresult - limit 100?

I'm using Visual Studio 2005 with Classic ASP.  I started running a working Salesforce application on a new conputer and I'm getting an error that I don't get on either the server or on other computers. 

When looping through a queryresult, I get an 'unknown exception' error when I reach record number 100.  My code looks something like this:

Set sf_queryresult = SforceApi.Query("select Name, ID from account", False)
if sf_queryresult.size > 0 then
 x = 0
 For Each sf_record In sf_queryresult
  x = x + 1
  'do something with sf_record
 Next
end if

The 'unknown exception' occurs on the 'next' statement with the value of x equal to 100.

Is there a configuration setting somewhere that limits a query to 100 records?  I've checked the documentation, and the limits appear to be much higher than this.

I would appreciate any help that I can get on this.  Thank you.

foghornfoghorn

What OS are you running on?

 

Can you post a reproducible test case?

 

 

bill hayhowbill hayhow

I'm using Visual Studio 2005 on Windows XP Pro, SP2.

Here is test code that works:

Set sf_queryresult = SforceApi.Query("select Name, ID from account", False)
if sf_queryresult.size > 0 then
 x = 0
 For Each sf_record In sf_queryresult
  x = x + 1
  if x >= 99 then exit for
 Next
 response.write(x & " accounts")
end if

If I take out the 'if x >=99 then exit for' line, then I get this error:

  • Error Type:
    (0x80004005)
    Unspecified error
    /slap01/test.asp, line 37

    Any ideas?