[QODBC-Desktop] Troubleshooting: QODBC connection lifecycle with VB
Posted by brad waddell on 12 March 2009 05:21 PM
Troubleshooting: QODBC connection lifecycle with VB
I have a VB6 application that queries QuickBooks. QODBC takes about 10 seconds to make the handshake with the connection string, so any query to QuickBooks is very slow if I create the connection each time and then close it when the query is completed. However, since this is used over the network, will there be a lot of network traffic in maintaining the connection when it is not needed? What are the performance considerations regarding leaving a QODBC connection open when not actively using it?
How do I release the file with QODBC while keeping the connection open? Besides, when I open the connection to QuickBooks using QODBC and leave it open, I cannot open the QuickBooks file using the QuickBooks interface. I get the message, "An Integrated Application is currently sharing data with QuickBooks. Please wait until the application is finished and try again".
First, the performance considerations are the same as leaving QuickBooks running. QODBC connects to QuickBooks and is the same as using the QuickBooks User Interface. Don't type anything on the keyboard is the same as the connection not running a query.
Second, suppose you want to use the QuickBooks UI (User Interface) while QODBC is connected. In that case, you either open QuickBooks and the company file first and then connect QODBC or allow QODBC to auto-launch QuickBooks by checking the Launch QuickBooks UI option instead.