AsiaTech: Microsoft APGC Internet Developer Support Team

We focus on various troubleshooting plan and solution on IIS web platform and distributed applications

ASP cannot open encrypted Access 2007 database file via ODBC

ASP cannot open encrypted Access 2007 database file via ODBC

  • Comments 1

 

Symptom:

To reproduce the issue:

1.        Install “2007 Office System Driver: Data Connectivity Components” in order to open the new Access 2007 .accdb database file.

http://www.microsoft.com/downloads/details.aspx?familyid=7554F536-8C28-4598-9B72-EF94E038C891&displaylang=en

 

2.        Place an .accdb Access 2007 database file on server.

The database is password encrypted.

 

3.        Setup an ODBC system DSN and point it to the .accdb database file.

Enter the database password in advanced options dialog box.

 

4.        Open the database in ASP page

<%

dim cn

set cn=server.createobject("adodb.connection")

cn.open "dsn=dsn1"

%>

This error message occurs:

Error 0x80004005 “Not a valid password”

 

Troubleshooting:

However similar .vbs code works.

dim cn

set cn=createobject("adodb.connection")

cn.open "dsn=dsn1"

And ASP works if the database is not encrypted.

Resolution:

In order to let it work, you must apply “Microsoft Office Access Runtime and Data Connectivity 2007 Service Pack 2 (SP2)” first.

http://www.microsoft.com/downloads/details.aspx?FamilyId=6F4EDEED-D83F-4C31-AE67-458AE365D420&displaylang=en

 

And then grant read/write permission to .accdb database file and .laccdb lock file to the IIS anonymous user account.

NOTE: Access is not recommended for server environment, for better performance and scalability, please using SQL server instead.

Best Regards,

Juntao Zhu

Leave a Comment
  • Please add 1 and 3 and type the answer here:
  • Post
Page 1 of 1 (1 items)