Results 1 to 4 of 4

Thread: How to make odbc connection force to close

  1. #1
    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.

  2. #2
    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.

  3. #3
    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.

  4. #4
    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.

Similar Threads

  1. Replies: 3
    Last Post: 26-03-2012, 10:30 PM
  2. ODBC connection to MS Excel file
    By Lakshmi.Vaidhyam in forum Software Development
    Replies: 6
    Last Post: 19-03-2011, 05:31 AM
  3. How to force safari toolbar to close an application in macosx
    By Esmel in forum Technology & Internet
    Replies: 5
    Last Post: 15-11-2010, 10:51 PM
  4. Force a program to close manually
    By Adamaris in forum Operating Systems
    Replies: 3
    Last Post: 21-05-2009, 10:22 PM
  5. Linking MS Project to MS Excel - ODBC Connection
    By manishdk in forum Microsoft Project
    Replies: 3
    Last Post: 19-12-2008, 07:17 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,722,001.03443 seconds with 17 queries