Hi there.
Im running my site off brinkster, so I cannot use a global.asa file so instead I have a global.asp file which runs if the global.asa file does not. I have a database connection in my global.asp file, because it is an mock e-commerce site and I check to see if my users have been to the site before and pull their username and other information out of my database. But since my global.asp file isnt like an .asa one and isnt exactly global (it only runs once at the very start) I have another file called dbconnect.asp which is included at the top of every file that needs to connect to the database.
Now heres the problem, when I first load my index page I get this error here which is to do with my database connection in my global.asp file:
Quote:
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 0x117c Thread 0xa3c DBC 0x18fb7004 Jet'.
/rosalieh/global.asp, line 23 |
Here is line 23 of global.asp:
Its my database connection, and the code for it to connect, which is above that reads as follows:
Quote:
Dim dbSt, oCon, oRST
Set oRST = Server.CreateObject("ADODB.Connection")
Set oCon = Server.CreateObject("ADODB.Connection")
dbSt = "Driver={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & Server.MapPath("/db/db.mdb") & ";" |
Now you may think that I may get the error because I have named my varibles the same in my dbconnect.asp file, but I havent, they are called
Dim strDBConnect, oConn.
My code in the dbconnect.asp file reads as follows:
Quote:
Set oConn = Server.CreateObject("ADODB.Connection")
strDBConnect = "Driver={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & Server.MapPath("db/db.mdb") & ";"
oConn.Open strDBConnect |
Now when I refresh the index page, it seems to load up and work perfectly. But its just the very first time you go there that this error comes up. I presume it is a conflict between my database connections, is there anyway to fix this so I get rid of the error?