-
I have created an App that uses a MSAccess database.I want to place a password for the DB to prevent prying eyes from seeing the contents, this process is easy enough from MSAccess. But when I try to run the App, it cant access the DB. Is there a way to pass the Password from my App to the DB on startup. I am using VB5 with Microsoft Access.
-
You need to supply the password when you open the database with the OpenDatabase method in VB. If your Access password was "topsecret", the code to open the DB in VB app would be:
Code:
Dim dbs As Database
Set dbs = OpenDatabase("C:\Whatever\MyData.mdb", _
False, False, ";pwd=topsecret")