ADODB connections and databas passwords

M

MarkD

We have a database password on an .mdb file.
The password is "test"

The following code does NOT work.
cn.Provider = "Microsoft.Jet.OLEDB.4.0"
cn.Open "Data Source=C:\testdb\db1.mdb", , "test"

I get an error "cannot start your application. the
workgroup information file is missing or opened
exclusively by another user." I have no workgroup
information and it's not opened by anyone.

I'm stuck. How do I feed the db password to open this
database?!?!?!?

-Mark
 
D

Douglas J. Steele

Try:

oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=c:\testdb\db1.mdb;" & _
"Jet OLEDB:Database Password=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