How to Open a Password encrypted .accdb

Joined
Apr 18, 2012
Messages
1
Reaction score
0
This is my code but i don't know why it failed to open it. Please help!!!

Dim db As ADODB.Connection
Dim rs As ADODB.Recordset
Dim Password As String


Password = "ABC"
Set db = New ADODB.Connection


db.Provider = "Microsoft.ACE.OLEDB.12.0"
db.ConnectionString = "Data Source=C:\Database (TEST)\test.accdb"
db.Properties("Jet OLEDB:Database Password") = Password
db.Open
 
Back
Top