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



To reproduce the issue:

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


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") "dsn=dsn1"


This error message occurs:

Error 0x80004005 “Not a valid password”



However similar .vbs code works.

dim cn

set cn=createobject("adodb.connection") "dsn=dsn1"

And ASP works if the database is not encrypted.


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


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 7 and 8 and type the answer here:
  • Post
Page 1 of 1 (1 items)