DataBase Security

M

Michael Jacob

My database is secured with a password, and it only opens
with that password.
The problem is when I try to open the Database from
Visual Basic, using the OpenDatabase method. How do i
pass the password.
This is not the User Level Security.
It sounds very simple, but I have not found any
documentation on this.
 
B

Bruce M. Thompson

My database is secured with a password, and it only opens
with that password.
The problem is when I try to open the Database from
Visual Basic, using the OpenDatabase method. How do i
pass the password.
This is not the User Level Security.
It sounds very simple, but I have not found any
documentation on this.

You must use the connect parameter of the OpenDatabase method.

'***EXAMPLE START
Dim db As DAO.Database

Set db = DBEngine.OpenDatabase("c:\MyData\MyData.mdb", _
False, False, ";pwd=password")

'***EXAMPLE END
 
M

Michael Jacob

Bruce, That worked perfect. Thanks

-----Original Message-----

You must use the connect parameter of the OpenDatabase method.

'***EXAMPLE START
Dim db As DAO.Database

Set db = DBEngine.OpenDatabase ("c:\MyData\MyData.mdb", _
False, False, ";pwd=password")

'***EXAMPLE END

--
Bruce M. Thompson, Microsoft Access MVP
[email protected] (See the Access FAQ at http://www.mvps.org/access)
within the newsgroups so that all might benefit.<<



.
 
Top