Database Password


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Database Password

  1. #1
    Join Date
    Dec 2005
    Posts
    92

    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 12:06 PM.

  2. #2
    Join Date
    Dec 2005
    Posts
    92
    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
    Location
    Orange, California
    Posts
    1,263
    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:
    Code:
    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, 04:22 AM
  2. Password Protection for database.
    By Jorge in forum VB Classic
    Replies: 5
    Last Post: 04-08-2002, 02:06 PM
  3. Password Protected Access97 Database and ADO
    By Jeff Powell Jonsson in forum VB Classic
    Replies: 2
    Last Post: 01-25-2002, 01:43 PM
  4. Password Protected Access Database
    By Jé-Pá in forum VB Classic
    Replies: 3
    Last Post: 12-05-2001, 03:37 PM
  5. help on password protected database
    By Frankie in forum VB Classic
    Replies: 2
    Last Post: 03-16-2001, 12:26 PM

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
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

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