Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: ODBC Error


Message #1 by "Brian S. VanDyke" <gemynd@h...> on Sat, 24 Nov 2001 13:35:13
I receive the following error...



  Microsoft OLE DB Provider for ODBC Drivers error '80004005' 



  [Microsoft][ODBC Microsoft Access Driver] Cannot open

  database '(unknown)'. It may not be a database that your application

  recognizes, or the file may be corrupt.



...when attempting to open an ASP page with a database connection on it. 

The page loads fine for a while, but then this error occurs without 

warning. If the server is rebooted, then the page works fine again - for a 

while. This starts a vicious cycle of me checking my web page every day, 

finding out that the ODBC connections for the NT server have been 

exhausted, then contacting my web host in order to reboot the server.



My web host says that this is simply an inherent problem with NT servers, 

they do not let go of their ODBC connections, even when specified in the 

code. They say there is no work-around, all patches are loaded onto the 

servers whenever Microsoft releases them.



The problem is, I see plenty of sites which connect to databases and they 

never seem to come down. What is the secret? I connect using the following 

lines (connection to Access 97 database)...



  Set THIS = Server.CreateObject("ADODB.Connection")

  THIS.Open "DRIVER={Microsoft Access Driver (*.mdb)};

    DBQ={directory path here}ThisDatabase.mdb"



...Thank you for ANY feedback - I'm getting desperate!



Brian
Message #2 by "Ken Schaefer" <ken@a...> on Mon, 26 Nov 2001 13:16:27 +1100
How do you .close and dispose of your connection objects?



Do you ever create any implicit connections? (eg by doing:



objRS.Open strSQL,  "DRIVER={Microsoft Access Driver (*.mdb)};

     DBQ={directory path here}ThisDatabase.mdb"



)



Cheers

Ken



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

From: "Brian S. VanDyke" <gemynd@h...>

Subject: [access_asp] ODBC Error





: I receive the following error...

:

:   Microsoft OLE DB Provider for ODBC Drivers error '80004005'

:

:   [Microsoft][ODBC Microsoft Access Driver] Cannot open

:   database '(unknown)'. It may not be a database that your application

:   recognizes, or the file may be corrupt.

:

: ...when attempting to open an ASP page with a database connection on it.

: The page loads fine for a while, but then this error occurs without

: warning. If the server is rebooted, then the page works fine again - for a

: while. This starts a vicious cycle of me checking my web page every day,

: finding out that the ODBC connections for the NT server have been

: exhausted, then contacting my web host in order to reboot the server.

:

: My web host says that this is simply an inherent problem with NT servers,

: they do not let go of their ODBC connections, even when specified in the

: code. They say there is no work-around, all patches are loaded onto the

: servers whenever Microsoft releases them.

:

: The problem is, I see plenty of sites which connect to databases and they

: never seem to come down. What is the secret? I connect using the following

: lines (connection to Access 97 database)...

:

:   Set THIS = Server.CreateObject("ADODB.Connection")

:   THIS.Open "DRIVER={Microsoft Access Driver (*.mdb)};

:     DBQ={directory path here}ThisDatabase.mdb"

:

: ...Thank you for ANY feedback - I'm getting desperate!



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




  Return to Index