I can connect fine when the database does not have a password set using this
code.
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=d:\database\Phase1.accdb"
%>
But when I try adding a password to the database by going to Database Tools,
then Encrypt with Password, and then add this line to the code, I can no longer
connect to the database.
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=d:\database\Phase1.accdb;Jet OLEDB:Database
Password='password';Mode=Share Exclusive"
%>
I get this error.
Error Type:
Microsoft Office Access Database Engine (0x80040E4D)
Not a valid password.
/includes/database.asp, line 5
Note that this works fine with an Access 2003 database in MDB format, but NOT
an access 2007 database in ACCDB format.
And I get the same error when I type the password into the string with and
without the quotes.
Please help :) Thank you.