Forum Moderators: open
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x760 Thread 0x8dc DBC 0x99d38dc Jet'.
/test.asp, line 27
<%
'declare your variables
Dim Connection, sConnString,sql,recordset
'declare SQL statement that will query the database
sql = "SELECT * FROM mytable"
'create ADO connection and recordset object
Set Connection = Server.CreateObject("ADODB.Connection")
Set Recordset = Server.CreateObject("ADODB.Recordset")
'define the connection string, specify database driver and the location of the database
sConnString = "DRIVER={Microsoft Access Driver (*.mdb)};" & "DBQ=" & Server.MapPath("mydatabase.mdb") & ";"
'Open the connection to the database
Connection.Open(sConnString)
'Open the recordset object executing the SQL statement and returning the records
Recordset.Open sql,connection
'Lets loop through the records until we come to the end
Do while not recordset.eof
response.write recordset("symbol") & "<br>"
'move on to the next record
recordset.movenext
Loop
'We are done so lets close the connection and the recordset
recordset.Close
Set recordset = Nothing
connection.Close
Set connection = Nothing
%>
The only way I found to fix it, was to create another folder, for example "database1", copy the DB into it, than delete the folder were the DB was before. Now rename "database1" to "database" - assuming this is the name of the original folder.
Now go to Windows Explorer, find the folder, right click on it, click properties, then security tab > click Everyone > check full control > Apply
If anybody else knows an easier way, I'd love to know it.