Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Password Protected Access Database

Status
Not open for further replies.

Mavors

Programmer
Aug 28, 2000
43
US
I am trying to make a connection with ADO to a MS Access database that has been password protected.

Currently trying with this connnection string:

Code:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=;pwd=mypassword"

I keep getting an error on this connection. I am thinking that with this formation I need to also provide a user id, but I really don't want to set the database up with groups and users. I would prefer to just have a password at the database level. If anyone could please suggest a change or way that I can go about this I'd appreciate any help provided.

Thank you in advance,
Mavors
VB, VBA Programmer
Ohio
 
Give this fragment a try.

dim dbs as String
dbs = "Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Jet OLEDB:Database Password=" & mypassword

It is the general form I use. Don't forget that the spaces in the string are important.

jimml
VB Programmer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top