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!

connect string for VB to Access with a Password 2

Status
Not open for further replies.

Vika

Programmer
Joined
Jul 31, 2000
Messages
29
Location
US
I am having trouble connecting to Access 97 once I set a password in Access. I am connecting from VB6. What does the connect string with the password on the opendb look like?
db.Open "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = '" & sDataSource &
"';User Id =; Password = Admin;"

Is this correct??? -- this doesn't work....

 
If you are using a workgroup (system database):

db.provider = "Microsoft.Jet.OLEDB.4.0 "

db.Properties("Jet OLEDB:System database") = "c:\sysdb.mdw"

db.Open "Data Source = " & sDataSource & "User Id = Admin;Password = password;"

If your MDB has a database password:

db.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & sDataSource & _
"Jet OLEDB:Database Password=MyDbPassword;", _
"admin", ""

Eric De Decker
vbg.be@vbgroup.nl

License And Copy Protection AxtiveX.

Download Demo version on my Site:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top