How to make odbc connection force to close
I have created input interface in VB and make connection at the Back-end with the Oracle database this connection flows through VB-->ODBC-->ORCLE, first establishing ODBC connection took time now closing connection..:crybaby: Is there any way to close an ODBC connection via DSN without completely closing the Access front-end? Any help will be appreciated.
Re: How to make odbc connection force to close
The Microsoft Access engine will maintain a persistent connection on an ODBC connection in order to be more efficient, even after using a Close method on a database opened with ODBC. Enter the values to the spreadsheet using COM, then use a DTS package to export the results to SQL 7 and a consequent simple select query to return the result to output.
Re: How to make odbc connection force to close
To close the connection successfully, you must end the Visual Basic application. Even though this is by design, many times the connection is unwanted. It is worth rememberng that the problem occurs when two consecutive queries are run on the same excel datasource and that the CFUSION_DISABLE_DBCONNECTIONS command wont fixOne way to force the connection closed is to set ConnectionTimeout to the minimum setting of one second. A setting of zero indicates to never close the connection. It is defaulted to a value of 600 seconds, or 10 minutes. If a Visual Basic program does not reopen the ODBC connection after doing a Close method, a timeout occurs and the connection closes automatically.
Re: How to make odbc connection force to close
You can control the timeout period by placing the following line in your VB.INI or <vb_exe_app_name>.INI file, where x is the number of seconds. As far as I can tell, your PTQ won't work unless it has a DSN connection. To close the connection you may use this [ODBC] ConnectionTimeout=x
The ADO DSNless stuff allows you to create ADO recordsets which are using Oracle SQL in code and have these recordsets assigned to a form and some other objects as its recordsource.