Cannot open password protected Access DB

  • Thread starter Thread starter nagar
  • Start date Start date
N

nagar

I'm trying to open a password protected DB file using this c# code

string connString = @"Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=db1.mdb; Jet OLEDB:Database Password=andrea";

OleDbConnection conn = new OleDbConnection(connString);
conn.Open();

The DB is located in the debug folder of the application and the
password is andrea
If I open the DB from Microsoft Access it works fine.

Any idea of what I'm doing wrong?

I get an error telling me that the file doesn't exist. If I remove the
password from the DB and the Password intruction from the connection
string it works fine.

Shall I send you the protected DB1.mdb file?

Thanks.
Andrea
 
I'm trying to open a password protected DB file using this c# code

string connString = @"Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=db1.mdb; Jet OLEDB:Database Password=andrea";

OleDbConnection conn = new OleDbConnection(connString);
conn.Open();

The DB is located in the debug folder of the application and the
password is andrea
If I open the DB from Microsoft Access it works fine.

Any idea of what I'm doing wrong?

I get an error telling me that the file doesn't exist. If I remove the
password from the DB and the Password intruction from the connection
string it works fine.

Shall I send you the protected DB1.mdb file?

Thanks.
Andrea

You may need to supply the user name along with the password in the
connection string. The user name is "Admin".
 
Thanks for the suggestion but I'm still experiencing the same problem

string connString =
@"Provider=Microsoft.Jet.OLEDB.4.0;Password=andrea;User
ID=Admin;DataSource=db1.mdb";

I'm attaching the DB (password: andrea).
Thanks.
Andrea
 
Thanks for the suggestion but I'm still experiencing the same problem

string connString =
@"Provider=Microsoft.Jet.OLEDB.4.0;Password=andrea;User
ID=Admin;DataSource=db1.mdb";

I'm attaching the DB (password: andrea).
Thanks.
Andrea
 
Thanks for the suggestion but I'm still experiencing the same problem

I've used:

string connString =
@"Provider=Microsoft.Jet.OLEDB.4.0;Password=andrea;User
ID=Admin;DataSource=db1.mdb";

Can I send you the DB to test?

Thanks.
Andrea
 
Thanks for the suggestion but I'm still experiencing the same problem

I've used:

string connString =
@"Provider=Microsoft.Jet.OLEDB.4.0;Password=andrea;User
ID=Admin;DataSource=db1.mdb";

Can I send you the DB to test?

Thanks.
Andrea
 
Thanks for the suggestion but I'm still experiencing the same problem

string connString =
@"Provider=Microsoft.Jet.OLEDB.4.0;Password=andrea;User
ID=Admin;DataSource=db1.mdb";

I'm attaching the DB (password: andrea).
Thanks.
Andrea

You don't need to post the same reply four times, I am capable of
reading something that is posted only once.

Try changing "DataSource" to "Data Source".
 
I'm sorry about the multiple post. I had trouble uploading the test db
and the message was sent many times.
I'm sending you the project (in VS2008) by email. Would you be so kind
to have a look and see why it doesn't work.
I really appreciate that. Thanks so much!
Andrea
 
Back
Top