How to open a password-protected Access database with DAO?

J

Jarek

In my VB6 program, I open an Access database with a VB statement like that:

Set daoDB36 = DBEngine(0).OpenDatabase("c:\.\adatabase.mdb")

Now, I would like to protect my database with a password. I can set the
password using the MS Access application.

But, how do I open the password-protected database using VB? I don't want to
install an ODBC data source on the user computer. There must be a way to do
it with .OpenDatabase(filename)?
 
C

CSmith

Hi,

Here's an example:

OpenDatabase("C:\MyDB.mdb", False, False, "MS Access;PWD=test")
 

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

Top