Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



How to make odbc connection force to close

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 13-08-2009
Member
 
Join Date: Aug 2008
Posts: 129
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.. Is there any way to close an ODBC connection via DSN without completely closing the Access front-end? Any help will be appreciated.

Reply With Quote
  #2  
Old 13-08-2009
Member
 
Join Date: Dec 2008
Posts: 202
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.
Reply With Quote
  #3  
Old 13-08-2009
Member
 
Join Date: Jan 2006
Posts: 211
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.
Reply With Quote
  #4  
Old 13-08-2009
Member
 
Join Date: Jan 2009
Posts: 134
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to make odbc connection force to close"
Thread Thread Starter Forum Replies Last Post
Even after force close steam application reopens itself in HTC Wildfire Maryland Portable Devices 3 26-03-2012 10:30 PM
ODBC connection to MS Excel file Lakshmi.Vaidhyam Software Development 6 19-03-2011 05:31 AM
How to force safari toolbar to close an application in macosx Esmel Technology & Internet 5 15-11-2010 10:51 PM
Force a program to close manually Adamaris Operating Systems 3 21-05-2009 10:22 PM
Linking MS Project to MS Excel - ODBC Connection manishdk Microsoft Project 3 19-12-2008 07:17 AM


All times are GMT +5.5. The time now is 10:56 AM.