[QODBC-Desktop] Two Connections
Posted by brad waddell on 12 March 2009 05:21 PM
Troubleshooting: Two Connections
Problem Description 1
I will read from and write to QuickBooks data file from the VB6 application.
So far, I have realized that QBSDK (QBFC) is not good enough to retrieve the data I want. It doesn't allow me to select only the fields I need and to add the criteria I want. But it is done pretty well with QBODBC. But I do not know how to enter new records into QuickBooks (I'm not talking about the INSERT statements). QuickBooks and QBSDK use their internal stuff to create ListIDs and some other values for many fields. They also make some relations. For instance, adding a new Customer from QBSDK doesn't require to do much work.
I came up with the idea to use two approaches to work with QB data - SDK to write to the QB data file and QODBC to read from it. But to work that way, I need to have two connections - 1 for SDK and another for QODBC stuff. Creation of each link takes about 20 seconds on my local machine. 40 seconds together. Is there any way to use one link for both? It could decrease the time for connection.
Yes, use QODBC!!! QODBC has an SQLite backend server with many additional indexes to what the QuickBooks SDK supports, so data can be retrieved much faster than calling QuickBooks directly. Also, QODBC supports batch inserts so that you can add up to 500 transactions or inserts simultaneously.
And QODBC will commit all the inserts when the sp_batchupdate stored procedure is executed.