DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  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 11:06 AM.

  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,252
    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, 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

Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links