Accessing password-protected databases from .Net Framework



Any help would be much appreciated.
How can I open a password-protected mdb file from a C# application? What
should the connection string look like? I can open the database if it doesn't
have a password, but once I set a password (using Tools->Security->Set
Database Password) it doesn't work even when I include the password in the
connection string. It gives the error "Invalid user name or password".
It seems to me that the "User ID" and "Password" in the connection string
are the ones that should be used to open Access itself and are strored in the
workgroup information file, but it's not the DATABASE password. Where in the
connection string the database password can be included?
I am using Access 2002.

Thanks for your help.

Tom van Stiphout

On Wed, 8 Oct 2008 01:26:02 -0700, Andrew

I always refer to for these issues.

Microsoft Access MVP


Thank you Tom,
I checked out the website and found my answer there...
Much appreciated!!


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question