Here is my code to open my access database: Set objConn = Server.CreateObject("ADODB.Connection") connStr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\database\data.mdb;Pwd=removed;") objConn.Open(connStr) set recordset = Server.CreateObject("ADODB.Recordset") recordset.ActiveConnection = objConn and to close the access database: objconn.close set objConn = Nothing I have used that exact code for years so I don't think its a coding issue Here is the problem: The Access Database opens and closes fine on the first request. But when I try to open and close again, I get Provider error '80004005' Unspecified error. If 20 to 30 seconds pass and I request the database a connection is possible. This condition is happening when I try to open and close the database multiple times in the same script, or refresh the page. Thanks, Matt
They symptoms you are experiencing does sound like the Access database file is hanging. Try updating your connection string using this example from this kb article. http://support.Winhost.com/KB/a686/how-to-query-an-access-2007-database-with-asp-using.aspx
Hi, I replaced my connection string with: Set objConn = Server.CreateObject("ADODB.Connection") connStr = ("Provider= Microsoft.ACE.OLEDB.12.0;Data Source=" & Server.MapPath("\database\data.mdb;Pwd=removed;")) objConn.Open(connStr) set recordset = Server.CreateObject("ADODB.Recordset") recordset.ActiveConnection = objConn Now I get the following error: Microsoft Access Database Engine error '80004005' Could not find installable ISAM. Thanks, Matt
The connection string should work. How is your Access database setup? Can you set it up with a password requirement?
I'm not sure what you mean with how my Access database is set up. I do have a password in the connection string. I am using Access 2000. I also haven't had this problem before. Everything worked fine in the past.
Try this instead and see if this will work. "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("\database\data.mdb;Pwd=removed;")) If possible can you setup the Access database to not require a password to be passed through it?
That connection string didn't work either. However, i tried my original connection string again, and now it works fine. The connection string has worked fine for the past month, but it didn't work today for a few hours. Thanks for you help and quick responses, Matt