• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 194
  • Last Modified:

Opening a password-secured MS-Access Database

I'm trying to open a local MS-Access 97 Database, (path is same as application, but that doesn't matter anyway)
When I had not password-locked the db, all I need was
    Set DB = OpenDatabase(DbaseName)

But now that I need the database to be more secured, I put in a password, but I don't know where to put it in the function call.
I think it's supposed to be in the connection string but I've tried the following, but it doesn't work, it says "Invalid Password".
    Set DB = OpenDatabase(Dbasename, , , ,"Pwd=MyDbPassword")

Any help would be greatly appreciated.
0
Shak
Asked:
Shak
  • 2
1 Solution
 
ShakAuthor Commented:
Edited text of question
0
 
DQCommented:
OpenDatabase(App.Path & "\my.mdb",False,False,";Pwd=" & pwd)
0
 
ShakAuthor Commented:
Thanks a LOT!
Real simple isn't it?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now