Click to See Complete Forum and Search --> : OpenDatabase method ?


raghu_nv
January 8th, 2001, 07:08 AM
Hi,
Can somebody tell me what is the correct syntax to open a pasword protected access (.mdb) database using DBEngine.OpenDatabase method.
Thanks advance.

sameerd
January 8th, 2001, 09:56 AM
dim dbName as Database
dim sdbLocation as String

' Assuming that your password is testpassword, the code will look as follows

sdbLocation = "C:\Test.mdb"
Set dbName = OpenDatabase(sdbLocation, False, False, ";pwd=" & "testpassword")

Sameer!!!