
Password Problems connecting VB6 to an Access 7.0 DB
Quote:
> I have read in 4-5 different books and I am still unable to:
> 1. Once a password has been setup in Access 7.0 DB
> 2. Pass the password from a VB6 program and unlock/open
> the DB.
> Set DB = OpenDatabase(Data1.DatabaseName, True, False,
> "UID=Admin;PWD=xxxx;")
> Could someone give me a hand?
Hi,
You are using Jet to get tio the DB?
If so, then use the DBEngine Object to define your system DB (security
is contained in your system db and you need to tell the dbengine where
the heck that is before you attempt to use passwords and uid's
' Ensure that the Microsoft Jet workgroup information
' file is available.
Dim dbsNorthwind As Database, Ws as workspace
DBEngine.SystemDB = "system.mdw"
Set ws = CreateWorkspace("JetWorkspace", "admin", _ "", dbUseJet)
Set dbsNorthwind = ws.OpenDatabase("Northwind.mdb")
Regards
Trevor