ASP cannot open Access database
Posted on 2007-04-03
I just installed IIS on a Vista laptop and cannot open an Access database from ASP using LocalHost. Here’s the code:
dim cn, dbname
dbname = "C:\tempx\op.mdb"
set cn = server.createobject("ADODB.Connection")
cn.provider = "microsoft.jet.oledb.4.0"
cn.properties("data source") = dbname
Response.Write "Here 1 <BR>"
Response.Write "Here 2 <BR>"
(I have unchecked “Friendly Error Messages”, but still cannot see the actual error message), but here is what I get when I run the code:
An error occurred on the server when processing the URL. Please contact the system administrator
I am guessing that the error is generated when it tries to create the “LDB” file during the open operation, so I have temporarily opened up permissions as follows:
Regarding folder Permissions for C:\ tempx, I have given Full Control to Everyone as well as the Anonymous Login account.
Regarding file Permissions for C:\ tempx\op.mdb, I have given Full Control to Everyone as well as the Anonymous Login account.
I also gave Full Control to Everyone as well as the Anonymous Login account for the folder that the ASP program is in.
What else do I need to do to allow an ASP program to be able to open the Access database?