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
(e-mail address removed) (See the Access FAQ at http://www.mvps.org/access)
within the newsgroups so that all might benefit.<<



.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top