Visual Basic 6
Access 97
Windows 2000
I created a database programmatically with vb. My application is able to create and open the database with the password I set. However, when I manually doubleclick on my database to open it, I type in the same password and it says "Not a valid password".
I have 4 different applications with the same code (except for queries) and 2 out of those give me that problem. Any idea as to what the problem could be? Which part of my code should I post?
here's the line of code I use to create the database
sPassword = App.EXEName
Set dbLocal = dbWorkspace.CreateDatabase(sLocalPath, dbLangGeneral & ";Pwd=" & sPassword)
and here's the line of code I use to open the database
sLocalPath = App.Path & "\PlannerSummary.mdb"
sPassword = mdbPASSWORD(sLocalPath)
Set dbLocal = dbWorkspace.OpenDatabase(sDbName, False, False, ";Pwd=" & sPassword)
mdbPASSWORD is a function that returns the password (and it returns my app name, which is PlannerSummary, with some null caracters at the end.