[QODBC-Desktop] Two Connections
Posted by brad waddell on 12 March 2009 05:21 PM
|
|
Troubleshooting: Two ConnectionsProblem Description 1I'm going to read from and write to QuickBooks data file from VB6 application. So far I realized that QBSDK (QBFC) is not good enough to retrieve data I want. It doesn't allow to select only fields I need and to add criteria I want. But it is done pretty good with QBODBC. But I do not know how to enter new records into QuickBooks (I'm not talking about INSERT statement). QuickBooks and QBSDK use their internal stuff to create ListIDs and some other values for many fields. They also create 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 2 approaches to work with QB data - SDK to write to QB data file and QODBC to read from it. But in order to work that way I need to have 2 connections - 1 for SDK, another one for QODBC stuff. Creation of each connection takes about 20 seconds on my local machine. 40 seconds together. Is there any way to use one connection for both? It could decrease the time for connection. Solutions 1Yes, just 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 you can add up to 500 transactions or inserts at the one time. Batch Statements For example: BatchStart BatchInsert1 ............................. BatchInsert500 BatchUpdate And QODBC will commit all the inserts when the sp_batchupdate stored procedure is executed. | |
|