Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : Iterator Error occurs infrequentlySearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC Bug Reports

 New Topic 
 
 Post Reply 
[1]  
 Iterator Error occurs infrequently 
 Author   Message 
  jeff 
  
 Group: Members 
 Posts: 76 
 Joined: 2006-06-03 
 Profile
 Posted : 2006-07-21 04:06:31

I am recieviing the following error, but only sometimes during the first load and after that the error will go away. The line of javascript that causes the error is rs.MoveNext();

sql2 = "SELECT * from Customer where FullName = '" + sqlSafe(fullName) + "' or fullName like '" + sqlSafe(fullName) + ":%'";

rs.Open(sql2,this.conn);

var index = 0;

while(!rs.EOF)

{

var customer2 = new Customer2();

customer2.listId = rs("listId").Value;

customer2.name = rs('FullName').Value;

customer2.priceLevelRefListId = rs("PriceLevelRefListID").Value;

customer2Array[index++] = customer2;

rs.MoveNext();  //this line causes the error

}

rs.close();

-------------------------------------------------------error messsage --------------

 

 

 

 

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[QODBC] Error: 3391 - The iteratorID "{9c3c2e4a-4ec7-417f-bc52-cf986b4634fb}" is not valid.

/devcrm/CustomPages/QBEntities.js, line 636

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-07-21 08:30:24

This is a confirmed bug of QODBC v6.00.00.176.

We will most likely add a setting to the QODBC Advanced Setup tab to turn off the Iterators for use with MS SQL Server and other multi-threaded applications such as web servers. The QuickBooks session is per thread and we have to restart a new session every time the thread ID changes.

Note: Only USA Editions of QuickBooks 2006 have the iterator feature, meaning QuickBooks 2005 and other country versions (non-USA editions) don't have this issue. 

 

  Top 
  jeff 
  
 Group: Members 
 Posts: 76 
 Joined: 2006-06-03 
 Profile
 Posted : 2006-07-21 10:54:22

What is the actual cause of the error? Is it caused by the sql statement using the like keyword with percent sign? I'm asking because all my other queries work fine without a problem. Only this one query fails inconsistently.

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-07-21 11:07:13

Basically when using QuickBooks 2006 we use the Intuit SDK 5.0 iterator to speed up the query. In QODBC v6.00.00.176 it was reduced to 100 rows and we are now seeing these types of errors when the thread ID changes midstream.

You will not have the problem where less than 100 records are returned by the query. It can happen if the thread ID changes on row 101.

 

  Top 
  jeff 
  
 Group: Members 
 Posts: 76 
 Joined: 2006-06-03 
 Profile
 Posted : 2006-07-21 11:44:41

So my query:

SELECT * from Customer where FullName = '" + sqlSafe(fullName) + "' or fullName like '" + sqlSafe(fullName) + ":%'";

(notice the use of semi colon to get all children)

really returns all the customers records(more than a 100) and then filters the result set. I ask because typically this query return 5 or 6 records. It is meant to return all children of the top level parent. I don't think that I'll ever have more than 100 children. How can I rewrite this query so that it doesn't crash and gives me all the children(even if there are grand children, ie more than 2 levels deep)?

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-07-21 12:28:47

Try:

SELECT * from Customer where FullName = '" + sqlSafe(fullName) + "' or ParentRefFullName= '" + sqlSafe(fullName) + "'";

 

 

  Top 
  jeff 
  
 Group: Members 
 Posts: 76 
 Joined: 2006-06-03 
 Profile
 Posted : 2006-08-08 12:30:02

When does the next release come out to fix this bug?

Also, I noticed that my result set only has 4 records in it, but the iterator error still occurs randomly.

Tom said: "You will not have the problem where less than 100 records are returned by the query. It can happen if the thread ID changes on row 101."

With that said, I am receiving this error with less than 100 records being returned. Please clarify the cause of this error.

 

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-08-08 13:23:09

ParentRefFullName is not a QODBC jump-in, so your 4 records are still being filtered. I have been testing QODBC v6.00.00.182 for over a week. It has the default iterator size set back to 500 and receivepayment set to use iterators again. On the QODBC Advanced tab there are two new items. Use Iterators-turn off to force chunking. And Iterator Chunking Size. That is the number that either Iterators or Chunking use (Depending on the mode it is in).

Unfortunately, my testing revealed three further bugs introduced by the new feature and that's been corrected right now. I expect the fix next week. You will simply uncheck "Use Iterators" and QODBC will revert back to QuickBooks 2005 style chunking instead of using the default new QuickBooks 2006 iterator mode.

 

  Top 
  jeff 
  
 Group: Members 
 Posts: 76 
 Joined: 2006-06-03 
 Profile
 Posted : 2006-08-09 03:00:43
thanks Tom, thats great news. 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to