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 : Select on Transaction Table HangsSearch Forum

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

 New Topic 
 
 Post Reply 
[1]  
 Select on Transaction Table Hangs 
 Author   Message 
  PH 
  
 Group: Members 
 Posts: 41 
 Joined: 2007-02-02 
 Profile
 Posted : 2008-11-05 12:03:44

I've purchased QODBC for my client's environment now and I'm using it on U.S. Premier 2007.  You indicated in another post that I should be able to access the transaction table.

First, when I choose Transaction on the Quickbooks Schema page I get the following error, but I think that's because a screen capture is irrelevant to this table and the information I need is in the detail.

 Microsoft JET Database Engine error '80040e14'

Syntax error (missing operator) in query expression 'table_category_id = and tn_us = TRUE'.

/docs/html/qodbc/config/include/ado.runtime6.asp, line 190

Then, when I do any query on transaction through the VB Demo 32 is hangs both the demo as well as Quickbooks.  I have to exit both via task manager.  I tried right-clicking on the QODBC driver and choosing stop query, but even after waiting patiently, nothing changes.

As far as the driver status, there are two windows.  The first says Transaction Waiting on Quickbooks 0 of 0, and never changes.  The second says Transaction Optimizing Table 0 of 0 and never changes.

I can probably get what I want from other tables or SP's, but a lot of what I am doing requires access to many different transaction types and it would be nice to have one place to reference this.

Thanks

 

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-11-05 13:53:50

The Transaction table tends to be very big, try:

SELECT * from Transaction UNOPTIMIZED where TnxDate > {d'2008-09-30'} and TnxDate < {d'2009-01-01'}

 

  Top 
  PH 
  
 Group: Members 
 Posts: 41 
 Joined: 2007-02-02 
 Profile
 Posted : 2008-11-05 16:44:49

Thanks.  This works.

But I want to use the transaction table and I need it to be fast.

Is it better to do the selects off the various tables such as bill, invoice or, where needed, unions of those rather than transaction table?  When is it appropriate to use the transaction table?

So, do I optimize first with sp_optimizefullsync transaction?

When I do that, it says "Busy Optimizing" but I cannot tell if it is doing anything.

The driver status says  Transaction "Waiting on Quickbooks" 0 of 0.  Is this normal?

When do you use the Nosync keyword to speed up queries?  What is the downside of using NOSYNC in SELECT queries?

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-11-05 21:03:57
Actually there's no such thing as the transaction table in QuickBooks, we have simply renamed an audit report. This also means that if a transaction is modified yesterday, today and tomorrow you will get three instances of the one transaction. For this reason we always use sp_report CustomTxnDetail instead. Again, this report can take a long time depending on the amount of transaction rows that will be returned. You should always break the report into smaller chunks, for example year by year chunks like this instead:

sp_report CustomTxnDetail show Date, Account, AccountType, Amount, Class
parameters DateFrom = {d'2005-01-01'}, DateTo = {d'2005-12-31'},
SummarizeRowsBy = 'Account'

sp_report CustomTxnDetail show Date, Account, AccountType, Amount, Class
parameters DateFrom = {d'2006-01-01'}, DateTo = {d'2006-12-31'},
SummarizeRowsBy = 'Account'

sp_report CustomTxnDetail show Date, Account, AccountType, Amount, Class
parameters DateFrom = {d'2007-01-01'}, DateTo = {d'2007-12-31'},
SummarizeRowsBy = 'Account'

sp_report CustomTxnDetail show Date, Account, AccountType, Amount, Class
parameters DateFrom = {d'2008-01-01'}, DateTo = {d'2008-12-31'},
SummarizeRowsBy = 'Account'

and if you're interested in just one account do:

sp_report CustomTxnDetail show Date, Account, AccountType, Amount, Class
parameters DateFrom = {d'2008-01-01'}, DateTo = {d'2008-12-31'},
SummarizeRowsBy = 'Account' where Account = 'AccountName'

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to