There's nothing wrong with:
SELECT RefNumber, TxnID, InvoiceLineSeqNo, InvoiceLineServiceDate, InvoiceLineItemRefFullName, InvoiceLineDesc, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineAmount FROM InvoiceLine Where RefNumber IN ('23','44','1')
but when using QODBC v7, the location of the optimized tables has changed to your login user profile folder, so existing connections might be hard coded wrong. It now looks like this:
ODBC;DSN=QuickBooks Data;SERVER=QODBC;OptimizerDBFolder=%UserProfile%\QODBC Driver for QuickBooks\Optimizer
Which most likely explains why VB Demo works.
The pass through optimizer only works in QODBC v7 if you have purchased a CD Key with a 07 serial number or have the USA edition of QBE 2007. The pass through optimizer is designed to pass multi-table join queires through to the SQLite engine backend, making it much faster.
In the case of QuickBooks Enterprise Edition, this will only become active when you install your QBE 2007 upgrade.
Unfortunately your query will still do a full table scan because RefNumber isn't a QODBC jump-in and therefore is not indexed. |