Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check which connections are still open????? 1

Status
Not open for further replies.

ComputerCop911

Programmer
Jul 30, 2003
97
0
0
CA
I am running a script connecting to an Access 2000 DB, and
its never done this before, but when I run a page it says

Microsoft JET Database Engine error '80004005'

Could not use ''; file already in use.

my connection string looks like this:

Dim ConnectString, conn

ConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.MapPath("\elogin\db\users.mdb") & ";" & _
"Persist Security Info=False"
Set conn = Server.CreateObject("ADODB.Connection")
conn.open ConnectString

I was wondering how I can check which connections are still open, using either a .vbs or .asp file, and if there are any open, then close them.


ComputerCop911
ASP/HTML Programmer
 
by the way, YES, all my pages have tags to close the connections and set them to Nothing

ComputerCop911
ASP/HTML Programmer
 
Hi,

This shud work...

If conn_obj.State = 1 Then
conn_obj.Close
Set conn_obj = Nothing
End If

conn_obj is the connection object

selani
 
I run into this if I have the mdb file open when I try to execute.
 
my mdb file is closed when this happens, but the CONNECTION to it is still open.

thanks, selani!

ComputerCop911
ASP/HTML Programmer
 
Try to Enable Conexion Pooling for the Access drivers and set a short value for that.

________
George, M
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top