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 : Unable to Query DepositLine with 'Where' statementSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC v6 Forum

 New Topic 
 
 Post Reply 
[1]  
 Unable to Query DepositLine with 'Where' statement 
 Author   Message 
  Harry Saryan 
  
 Group: Members 
 Posts: 13 
 Joined: 2006-04-25 
 Profile
 Posted : 2006-05-03 06:58:08

When I run "Select * from DepositLine" I get 6,630 records.

But when I run " Select * from DepositLine where DepositLineEntityRefListID='70000-1019436753' " it stops running after 15 sec. I do know for fact the ID number exists in the list of records. 

But it will work fine with the Where clause if I use
" Select * from DepositLine where TxnID='C44-1019631038' ", so it works fine on the TXNid field with the Where clause but not on any other of the fields.

Any help is appreciated
Harry

 

 

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-05-03 09:07:46

Sounds like the .opt optimized DepositLine table is out of sync. You can resync the opt table by running:

sp_optimizefullsync DepositLine

or you can run the query directly against QuickBooks by doing:

Select * from DepositLine UNOPTIMIZED where DepositLineEntityRefListID='70000-1019436753'

See: How do I setup the QODBC Optimizer? Where are the Optimizer options? for more.

 

  Top 
  Harry Saryan 
  
 Group: Members 
 Posts: 13 
 Joined: 2006-04-25 
 Profile
 Posted : 2006-05-03 09:46:37

Well, unfortunatly Unoptimized does not help.

My current connection is "Remote Connector" to our file server which has QODBC insalled with QuickBooks.  I have the optimizer off on my computer but it's ON at the file server. So when I run Query the QODBC drivers connect to our file server ODBC drivers and it retrieves the information from a remote site.

So when I run the same line on VB demo 32 on the File server it works fine. But when I run it on my computer it does not bring anything else up.  But it works fine on other query, like I mentioned before.

Also the optimizer just finished Reloading All Data on the file server. And again it does not work.

 

Thank you

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-05-03 10:06:59
Please run the query using the UNOPTIMIZED tag on your (REMOTE) computer:

Select * from DepositLine UNOPTIMIZED where DepositLineEntityRefListID='70000-1019436753'

 

  Top 
  Harry Saryan 
  
 Group: Members 
 Posts: 13 
 Joined: 2006-04-25 
 Profile
 Posted : 2006-05-03 10:13:14

I do but that does not help either.

I ran the code below on my Remote computer. And it starts running for 5 seconds and it stops.

Select * from DepositLine UNOPTIMIZED where DepositLineEntityRefListID='70000-1019436753'

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-05-03 10:23:11

Suggest you recheck to see what you really have by running:

Select TxnID, DepositLineEntityRefListID from DepositLine UNOPTIMIZED

 

  Top 
  Harry Saryan 
  
 Group: Members 
 Posts: 13 
 Joined: 2006-04-25 
 Profile
 Posted : 2006-05-03 11:22:46

Ok, check this out.

I first ran this:
(Select TxnID, DepositLineEntityRefListID from DepositLine UNOPTIMIZED)
And it gave me 6,630 records

Then I copieid one ID from the DepositLineEntityRefListID field and ran this code
( Select TxnID, DepositLineEntityRefListID from DepositLine UNOPTIMIZED where DepositLineEntityRefListID='60000-1019435626' )

Well once again it only took 15 seconds and it stopped running and there were no results on the screen. But I did copy the new ID '60000-1019435626' from the DepositLineEntityRefListID field.  So I do know the ID exists in the table, but how come it does not pull it through when I use the Where clause-?

Thank you!

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-05-03 11:43:55

Sorry, I've checked the query here and it works fine, and you also know it works directly on your server too. For the record what version of QODBC and QuickBooks are you using?

Is your server running Terminal Services?

 

  Top 
  Harry Saryan 
  
 Group: Members 
 Posts: 13 
 Joined: 2006-04-25 
 Profile
 Posted : 2006-05-03 12:16:39

You nailed it right on.  I had upgraded the Qodbc drivers on the Server to ver. 6.00.00.155 as well as the Remote computer. But for some reason the remote computer would not show the updated version. So all I had to do was restart the remote computer and it showed the updated version and now everything works great!

Thank you for all your support.

Note:
I am connecting to our server remotely using Terminal Services. And Quickbooks and Qodbc are running from Terminal services session.  Is this a problem-?

 

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-05-03 12:25:28
No, but other forum readers should also look at: W2K3 Terminal Server / QB2006 Ent. + QODBC  

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to