ADODB connections and databas passwords

  • Thread starter Thread starter MarkD
  • Start date Start date
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
 
Try:

oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=c:\testdb\db1.mdb;" & _
"Jet OLEDB:Database Password=test"
 
Back
Top