get access data using ADO from an password protected mdb

D

Dan

I am currently using this connection string

Public Const ConnectionString As String = _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and
Settings\desktop\test.mdb;Persist Security Info=False"

Now that I have added a password to my access database - how should I change
the string to include the password.

Many thanks,
Dan
 
R

Ralph

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and
Settings\desktop\test.mdb;Jet OLEDB:Database Password=MyDbPassword;
 
R

RB Smissaert

Or put it in the connection Open arguments:

Dim oADOConn As ADODB.Connection

Set oADOConn = New ADODB.Connection
oADOConn.Open ConnectionString, MyDbUsername, MyDbPassword


RBS
 

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