Member Login

Username
Password
Forget Password
New Sign Up
  Search Forums

  FREE Support
  Forums

  QODBC v10
  QODBC v9
  QODBC v8
  QODBC v7
  QODBC v6

  QODBC FAQs

The QDeveloper Forum is the property of Data Access Worldwide, Australia. The contents of this forum have been taken by FLEXquarters.com Limited, Hong Kong at: http://support.flexquarters
.com/esupport/
without our permission.

 


 
If you can't
login and post questions or you are having trouble viewing forum posts:
Click Here
 
 
 
 

Forum : How do I setup the QODBC Optimizer? Where are the Optimizer options?Search Forum

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

 New Topic 
 
 Post Reply 
[1]  
 How do I setup the QODBC Optimizer? Where are the Optimizer options? 
 Author   Message 
  Tom Aczel 
  dd4bf_dawworld.jpg
 Group: Administrator 
 Posts: 6281 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-03-03 08:50:40

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. 

QODBC Qptimizer Setup

QODBC version 7 is a revolutionary version which is 10 times faster to use than previous editions in certain conditions due to the use of Optimizer technology. The first time you access a given QuickBooks table, QODBC by default optimizes access to that data, so the next time you need data from that table, it will be much faster.

QODBC works with all versions of QuickBooks, but QuickBooks 2006 and 2007 (USA Edition only) provides the best performance due to changes in the way our tools can access the data inside QuickBooks using the Intuit qbXML v5 & v6 SDK released currently for USA only.

QODBC has also been chosen to be included as a feature in the QuickBooks Enterprise Edition 2006 and 2007 products (USA Edition only) by Intuit, on the main file menu under Utilities. If you need a read-only edition of QODBC and have this United States version of QuickBooks 2006 Enterprise, you are ready to go, no purchase or CD Key required!

My recommended settings for using QODBC are shown here, read below for an explaination of all the options available to you.

  • Use Optimizer brings some data to a local cache to increase retrieval performance for queries. Check to activate the Optimizer.
  • Optimizer Database Folder: specifies where the local data store will be saved on disk. The default location %userprofile%\QODBC Driver for QuickBooks\Optimizer is under your Windows login account name under your Documents and Settings folder. The data will be stored in a file in this folder with a name similar to the company file name with a .opt extension. If you opt to store that data somewhere other than the default click the browse button and select the destination folder. With very large company files we suggest running synchronization after hours.
  • Keep my optimized data up to date as of: when you choose the optimizer to synchronize itself with your Company data. Depending on how static your data need is and the size of the file, you can opt for various time frames of synchronization. The farther down the list you go the less synchronization will occur and your queries will run much faster, but will be using less current data than the company file itself.
    • The start of every query is the default setting using the most current data. If your query needs require the latest up to the minute data and speed is not the primary focus use this default setting. Please keep in mind 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.
    • The start of every new connection (with "Load Updated Data" first) is used if you don't need to update the opitmized data while you are for example running queires or importing or exporting data. The optimized data is updated upon a new connection and left unupdated until the next new connection occurs again.
    • The start of every new connection (with "Reload All Data" first) is used if you need to rebuild opitmized data from scratch before running important queires (like Sales Commisions) or importing or exporting data. The optimized data is rebuilt upon a new connection and left unupdated until the next new connection occurs again.
    • The end of yesterday is used for a better balance between speed and data updating and would be the option that works best for most users. It only has to synchronize each table once per day and the data will be current as of the end of the previous day.
    • The end of last month option is a great speed boost for running last month or last year’s queries. It does not need to synchronize again to get the data.
    • The last time I pressed one of the load data buttons option allows you to control the synchronize timing. Synchronizing only occurs when you manually run it by pressing the Load Update Data in the QODBC setup screen.
    • For balances and stock quantities: the option "Nulls" - will return NULLs for all fields that cannot be kept in sync, "Dirty Reads" - means return the most current value that was loaded into the optimizer cache, and "Real Time" uses the slower method to get the data directly out of QuickBooks making sure you get the most current value for the requested fields. (Real Time is the previous method used).
    • Optimize data after an Insert or Update: causes QODBC to do "Load Updated Data" after an insert or update is executed on a table. Useful for programmers who want to test that their data has succesfully been written to QuickBooks. 
    • Multi-Table Sync: This option is unchecked by default for all non-USA enterprise users. If checked, the QODBC optimizer will use other tables to re-sync tables, however, this will slow down performance. When off all Multi-Table Sync fields become Real-Time fields. (Similar to version 7.0.x) Note: This feature is basically ignored and set to unchecked if the version is QBOE or SDK is less than v3 (used by QuickBooks 2004 USA and all QuickBooks versions outside USA). Prior to SDK v3 the other multi-sync tables did not exists so using real data for those fields is safer. 
    • Load Updated Data: This button is used to Synchronize your optimized data with your company file. This will only load the data that has changed since the last automatic or manual synchronization.
    • Reload All Data: This button is used to completely rebuild the optimized data from scratch. It is useful when you start with a new company if you do not want to synchronize the tables as you first encounter them and make sure that your data is 100% current.

See Also: How do I switch OFF or RESET the QODBC optimizer?

Note: You can also schedule full or update 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 QODBCLOG.TXT log file. Passing a DSN on the command line to these programs will choose the QuickBooks company file you wish to use.

Note: QODBC "Auto Login" unattended mode needs to be setup for this work, see: How do I setup QODBC to auto-login into QuickBooks and start it if it's not running? 

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 also can fully resync your optimized InvoiceLine table by running:-

sp_optimizefullsync InvoiceLine

and then update it manually at any point of time by doing:-

sp_optimizeupdatesync InvoiceLine

Or you also can fully resync ALL the QODBC tables by running:-

sp_optimizefullsync All

and then manually update ALL the QODBC tables at any point of time by doing:-

sp_optimizeupdatesync All

The following is a unofficial list of columns/fields affected by Null/Dirty Reads/Real Time as of March 27, 2007:- 

List Tables

Account

  • Balance
  • TotalBalance

Customer         

  • Balance
  • TotalBalance
  • CreditCardInfoCreditCardNumber
  • CreditCardInfoExpirationMonth
  • CreditCardInfoExpirationYear
  • CreditCardInfoNameOnCard
  • CreditCardInfoCreditCardAddress
  • CreditCardInfoCreditCardPostalCode

ItemInventory

  • QuantityOnHand
  • TotalValue
  • AverageCost
  • QuantityOnOrder
  • QuantityOnSalesOrder    

ItemInventoryAssembly

  • QuantityOnHand
  • TotalValue
  • AverageCost
  • QuantityOnOrder
  • QuantityOnSalesOrder

ItemInventoryAssemblyLine

  • QuantityOnHand
  • TotalValue
  • AverageCost
  • QuantityOnOrder
  • QuantityOnSalesOrder           

Vendor

  • Balance

Transaction Tables

Bill

  • AmountDue
  • IsPaid
  • OpenAmount

BillExpenseLine

  • AmountDue
  • IsPaid
  • OpenAmount

BillItemLine

  • AmountDue
  • IsPaid
  • OpenAmount

CreditMemo

  • CreditRemaining

CreditMemoLine

  • CreditRemaining

Invoice

  • AppliedAmount
  • BalanceRemaining
  • IsPaid

InvoiceLine

  • AppliedAmount
  • BalanceRemaining
  • IsPaid

PurchaseOrder

  • IsFullyReceived
  • PurchaseOrderLineReceivedQuantity
  • PurchaseOrderLineIsFullyReceived

PurchaseOrderLine

  • IsFullyReceived
  • PurchaseOrderLineReceivedQuantity
  • PurchaseOrderLineIsFullyReceived

Sales View
[Invoice]

  • Remaining
  • IsPaid

[CreditReceipt]

  • Remaining

SalesLine View
[Invoice]

  • Remaining
  • IsPaid

[CreditReceipt]

  • Remaining

SalesOrder

  • IsFullyInvoiced

SalesOrderLine

  • IsFullyInvoiced

VendorCredit

  • OpenAmount

VendorCreditExpenseLine

  • OpenAmount

VendorCreditItemLine

  • OpenAmount
 

  Top 
  Tom Aczel 
  dd4bf_dawworld.jpg
 Group: Administrator 
 Posts: 6281 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-04-28 22:47:35

With the release of QODBC v6.00.00.155 we had to do a little more checking for deleted transactions and payments so tables that reference a open balance now run slower. Most users tend to use queries like:

SELECT * from Customer

which will run slowly as QODBC has to display the correct current balance for each customer, while this will run much faster:

SELECT "Name","LastName","FirstName","BillAddressAddr1",
"BillAddressAddr2","BillAddressCity",
"BillAddressState","BillAddressPostalcode"
from Customer

However can also override your QODBC Optimizer configuration screen settings to suit what you are actually doing by using the following tags:

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

For example, to read new (recent) 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 WHERE Txndate > {d '2006-04-01'}

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

Another good example of using NOSYNC would be to get for example all historical 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.

 

  Top 
  Flash 
  
 Group: Members 
 Posts: 27 
 Joined: 2006-10-22 
 Profile
 Posted : 2006-11-29 10:06:07

Where are you putting these statements like:

sp_optimizeupdatesync InvoiceLine

I don't understand any of it. I'm using Access. Are these statements for Access because I can't get them to work there at all. Or is everyone using some kind of program I'm not aware of?

If these statements don't work in Access, is there a way to optimize and sync through Visual Basic in Access?

If they do, what the heck am I doing wrong?

 

  Top 
  Tom Aczel 
  dd4bf_dawworld.jpg
 Group: Administrator 
 Posts: 6281 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-11-29 12:35:58

Stored procedures can be executed as "DoCmd.RunSQL" commands or as pass-through queries, see: How do I create a Pass-Through Report using Microsoft Access 2003? 

 

  Top 
  Tom Aczel 
  dd4bf_dawworld.jpg
 Group: Administrator 
 Posts: 6281 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-07-10 09:56:21
Note: 'sp_optimizefullsync Customer' doesn't return any rows and cannot be run directly through a SQL Server linked server. A workaround would be, for a Update Sync:
SELECT * FROM OPENQUERY(QBLS, 'SELECT TxnID FROM Customer OPTIMIZE WHERE TxnID = "x"')

And for a Full Sync:
SELECT * FROM OPENQUERY(QBLS, 'SELECT TxnID FROM Customer VERIFY WHERE TxnID = "x"'

  Top 
  MacTorvald 
  
 Group: Members 
 Posts: 29 
 Joined: 2007-08-22 
 Profile
 Posted : 2008-03-31 14:29:41
when I am accessing the data on quickbooks, sometimes, appears the screen saying "Busy Optimizing (load Updated Data). Please Wait ItemInventory.

Therefore, it is taking a long time... how can I fix this.

i already tried to use calldirect, unoptimized and nosync however it also did not work.

If I test on VB demo the same query it works very fast. Please see the code bellow...


   Try

                Dim ConnQODBC As System.Data.Odbc.OdbcConnection

                Dim daQODBC As System.Data.Odbc.OdbcDataAdapter

                ConnQODBC = New System.Data.Odbc.OdbcConnection("DSN=QuickBookConnector")

                ConnQODBC.Open()

                daQODBC = New System.Data.Odbc.OdbcDataAdapter(strSQL.ToString(), ConnQODBC)

                ds = New DataSet()
                daQODBC.Fill(ds)

                ConnQODBC.Close()

                'Else 'Alert User

                '    Throw New Exception("Intuit Quickbook closed! Opening and try again, please...")

                ' End If

            Catch ex As Exception

                Throw ex

            End Try

 

  Top 
  Tom Aczel 
  dd4bf_dawworld.jpg
 Group: Administrator 
 Posts: 6281 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-03-31 14:43:16

Try using the The start of every new connection (with "Load Updated Data" first) option and confirm that the Multi-Table Sync option has been disabled. If not, uncheck the Multi-Table Sync option as this is often defaulted on (checked) with QuickBooks Enterprise and the QODBC Enterprise Desktop Edition.

 

  Top 
  Kirt 
  
 Group: Members 
 Posts: 1 
 Joined: 2008-06-13 
 Profile
 Posted : 2008-06-13 03:47:10
I am using the QBooks supplied version of QODBC.  When I modify the Optimization settings, these changes are not saved.

Is there any was to get around this behavior? 

  Top 
  Tom Aczel 
  dd4bf_dawworld.jpg
 Group: Administrator 
 Posts: 6281 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-06-13 07:37:54
Yes, make sure all QODBC connections are closed before making any optimizer setup changes. If you're using MS Access you will need to unlink all QODBC tables and then relink them to force the change.  

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to    

Copyright (c) 2006-2009
Data Access Worldwide, Australia. This FREE self help forum website was copied by FLEXquarters.com Limited, Hong Kong to: http://archive.qodbc.com
/forum50f5.html
without our permission.

The QDeveloper Forum is dedicated to the FREE professional exchange of information. QODBC and FlexODBC users can post support queries, report product bugs, or simply search topics for help. Data Access Worldwide - Asia Pacific normal office business hours are 9am to 5pm week days Australian EST with the exception of Public Holidays.
       
ABN: 86 544 223 459
PO Box 873, Boronia VIC 3155 Australia  Tel: 03 9761 3644  Intl: +613 9761 3644