DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2005

    Database Password

    I'd downloaded code from this site which COMPACTS a Access database using DAO.In the code the database is opened in the exclusive mode using these lines:

    Set WS = CreateWorkspace("", "admin", "", dbUseJet)
    Set DB = WS.OpenDatabase(g_strDatabase, True, False)

    Problem is my db is protected by a "database password",therefore,I must state it in the OpenDatabase method's Connect argument.But I am not aware of the parameter thru which the password has to be set.Without it I get the error:Not a valid password.I tried Jet OLEDB:Database Password but it didn't work.
    Last edited by softraj; 07-09-2006 at 11:06 AM.

  2. #2
    Join Date
    Dec 2005
    Ok guys & gals I found the answer:"MS Access;PWD=<password>".This you must set for the Connect argument.

  3. #3
    Join Date
    Aug 2004
    Orange, California
    You need to include the database password in the connect parameter of the
    OpenDatabase method. Example: if your data base password is 'JediMast3r'
    then open your database like this:
    Set DB = WS.OpenDatabase(g_strDatabase, True, False, ";pwd=JediMast3r")

Similar Threads

  1. Database not properly created
    By Arjuna in forum Database
    Replies: 2
    Last Post: 07-25-2007, 03:22 AM
  2. Password Protection for database.
    By Jorge in forum VB Classic
    Replies: 5
    Last Post: 04-08-2002, 01:06 PM
  3. Password Protected Access97 Database and ADO
    By Jeff Powell Jonsson in forum VB Classic
    Replies: 2
    Last Post: 01-25-2002, 12:43 PM
  4. Password Protected Access Database
    By Jé-Pá in forum VB Classic
    Replies: 3
    Last Post: 12-05-2001, 02:37 PM
  5. help on password protected database
    By Frankie in forum VB Classic
    Replies: 2
    Last Post: 03-16-2001, 11:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.