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 : Pass Through QueriesSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC SQL Support Forum

 New Topic 
 
 Post Reply 
[1]  
 Pass Through Queries 
 Author   Message 
  Matt 
  
 Group: Members 
 Posts: 25 
 Joined: 2006-04-25 
 Profile
 Posted : 2006-05-04 00:57:59

I've read your posts on using pass-through queries, and I think I'm going to have to change over to those. Could you explain a little more in detail what the differences are between the following options that you posted earlier? If I choose the OPTIMIZED tag, will I be able to retrieve the most up to date data from Quickbooks? (I have the the InvoiceLine and SalesOrderLine data in mind). What is the difference between NOSYNC and OPTIMIZED as far as how recent the data that will be available from Quickbooks is concerned? Also, what is Resyncing? Is that going to re-optimize all of the records? I need to be able to access the most recent data from Quickbooks at the beginning of each query, but without it optimizing every time (which the optimizer options in QODBC setup will help out). Thanks alot for your help!


VERIFIED | VERIFY - Forces Full Resync with QuickBooks on the optimized table before Query starts
CALLDIRECT | UNOPTIMIZED - Passthru query directly to QuickBooks - use no optimizations
OPTIMIZE | OPTIMIZED | NOSYNC - Passthru query to optimized table directly for maximum speed

Examples:

select * from InvoiceLine UNOPTIMIZED
select * from InvoiceLine NOSYNC
select * from InvoiceLine VERIFIED

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-05-04 08:10:33

The issue here is that the QODBC Optimizer is local to your computer only, so when other users change things in QuickBooks how does QODBC know? Well, by default the optimizer will update new and changed entries in a table from QuickBooks first and then execute the query against the local optimized table. This is faster than reading everything out of QuickBooks every time, especially the more data you have.

When you use either OPTIMIZE , OPTIMIZED or NOSYNC you by-pass the update process and the data read could be old. Resyncing updates the optimized table to match the data in QuickBooks. On the whole things work well, but the timestamps in QuickBooks are not changed by every change in QuickBooks, so when you're dealing with recent data that's changing all the time, you should use the CALLDIRECT or UNOPTIMIZED  tag.

For example, to read new InvoiceLines directly out of QuickBooks use:

select * from InvoiceLine UNOPTIMIZED WHERE Txndate > {d '2006-04-01'}

Or you can resync your optimized InvoiceLine table by first doing:

sp_optimizefullsync InvoiceLine

then read directly out of the optimized table by doing:

select * from InvoiceLine NOSYNC

This is very f...a.......s.................t.

Another good example of using NOSYNC would be to get for example all invoicelines before 2003:

SELECT * from InvoiceLine NOSYNC WHERE Txndate < {d '2004-01-01'}

as invocies before 2004 don't ever change, you can read them directly from the QODBC Optimizer. You just need to use unoptimized for crtical operations like Sales Commisions etc.

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

See also: How do I create a Pass-Through Report using Microsoft Access 2003? 

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to