PDA

Click to See Complete Forum and Search --> : How to open an Access Password protected database through ADO's


Dinesh_MS
Nov 19th, 2000, 10:44 AM
I want to know how to open an Access password protected database through ADO's

Thank You.

SysAdmin2
Nov 20th, 2000, 01:48 PM
Set cnADO = New ADODB.Connection

cnADO.Provider = "Microsoft.Jet.OLEDB.3.51"
cnADO.Properties("Jet OLEDB:Database Password") = "PASSWORD"
cnADO.Properties("Data Source") = "C:\Example.mdb"

cnADO.Open

Lafor
Nov 20th, 2000, 02:47 PM
That will work if he/she has the password...

Dinesh_MS
Nov 22nd, 2000, 12:39 PM
Thanks for the reply.
I found that on the Microsoft's Knowledge Base. But i got an error when i gave it as part of a property just as in the example, but worked fine when i gave it in the connection string.