ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   get access data using ADO from an password protected mdb (https://www.excelbanter.com/excel-programming/410241-get-access-data-using-ado-password-protected-mdb.html)

dan

get access data using ADO from an password protected mdb
 
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

Ralph

get access data using ADO from an password protected mdb
 
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and
Settings\desktop\test.mdb;Jet OLEDB:Database Password=MyDbPassword;

"Dan" wrote:

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


RB Smissaert

get access data using ADO from an password protected mdb
 
Or put it in the connection Open arguments:

Dim oADOConn As ADODB.Connection

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


RBS


"Ralph" wrote in message
...
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and
Settings\desktop\test.mdb;Jet OLEDB:Database Password=MyDbPassword;

"Dan" wrote:

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




All times are GMT +1. The time now is 12:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com