Since I upgraded my client's application to QuickBooks 2008 and QODBC for QuickBooks Version 8, the interface runs successfully, but QBW32.exe remains running after the connection is closed. The resulting connection state is 0 and there are no error messages in the QODBC log. We are having to manually terminate QBW32.exe every night. Otherwise, the QB backup does not run and it uses one of our QB licenses, preventing one user from logging on.
We are running QB on the main server and running the A5/QODBC on a Citrix server, with the QODBC DSN configured to connect to QB in multi-user mode.
I am using Alpha5 xbasic. Following is a shell of the code used to connect and disconnect:
dim SHARED conn as ole::adodb.connection
' Code to open connection
cs_QB = "DSN=my_QB_DSN;DFQ=;OpenMode=F;SERVER=QODBC" conn.Open(cs_QB)
' Code to close connection
if conn.state = 1 then fn_util_write_sys_audit("QB Interface","Disconnecting from QB",now()) conn.close() ' close Connection object and any active Recordset objects associated with the connection end if if conn.state = 0 then fn_QB_connection = .t. end if
I write an audit trail after the connection is closed, and it shows the connection state as 0:
|