Database with password, opendatabase statement

Niroth

Registered User.
Local time
Today, 10:04
Joined
Jul 12, 2007
Messages
81
Hey,

So I'm trying to set a connection to a separate database with this statement


Dim dbs1 As Database

Set dbs1 = OpenDatabase("C:\database2.mdb", , False, ";pwd='abc'")


An error message keeps popping up saying "not a valid password", but I am 100% positive the password is correct. Is something wrong with my statement?

Niroth
 
Did You try it without the single quotes around your password?
 
Yep. Didn't work.
 
This is a cut from one of my apps

Code:
   Set dbs = OpenDatabase(strDBPath, False, False, ";pwd=" & DBPass & "")

Where dbs, strDBPath and DBPass are all variables

David
 

Users who are viewing this thread

Back
Top Bottom