Locate the "QODBC Driver for QuickBooks" program group on your desktop. Click on the "QODBC Setup Screen" icon to launch the setup program supplied with QODBC.
The following general setup screen will become available.
Click on the Optimizer tab page.
Uncheck the Use Optimizer option. Read the location for your Optimizer Database Folder: and delete the yourcompanyname.opt file using Windows Explorer:
For QODBC v7, the default location of the .opt tables are now found in your login user profile. Swap 'Tom' in the below with your login name and delete the .OPT file.
Check the Use Optimizer option to reactivate and reset the Optimizer or leave it unchecked to leave the optimzer off.
See also: How do I setup the QODBC Optimizer? Where are the Optimizer options?
Note: You can also schedule full optimization overnight using either: QODBCFUL.EXE or QODBCUPD.EXE. Both set the errorlevel variable if errors are detected, and error messages are written into the log file. Passing a DSN on the command line to these programs will choose the QuickBooks company file you wish to use.
To temporarily bypass your optimizer settings and extract the latest information you can add the unoptimized tag after the table name like this to your queries:
select * from InvoiceLine unoptimized where TxnDate >= {d'2006-03-06'}
Or you can resync your optimized InvoiceLine table by running:-
sp_optimizefullsync InvoiceLine
|