passing a database password to 'opendatabase' statement

  • Thread starter Thread starter Jstevens1
  • Start date Start date
J

Jstevens1

Guest
Anybody Any Idea how to pass a database's password as an argument when opening with the 'opendatabase' statement?

here's what ive tried but it comes up with 'not a valid password'

Dim DB as Database

set DB = Opendatabase("t:xyz.mdb",,,";pwd=whatever")


ive checked that i have the correct password (the obvious answer!) and also tried passing the password into different arguments (by changing the commas)
 
Dim WrkJet as Workspace
Dim RepDB as Database

Set WrkJet = CreateWorkspace("NewJetWorkspace", "admin", "", dbUseJet)
Set RepDB = WrkJet.OpenDatabase("C:\MyFiles\MyDB.mdb", True, False,";PWD=MyPass")

HTH
 

Users who are viewing this thread

Back
Top Bottom