CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2000
    Location
    Belgium, Bruges
    Posts
    146

    DAO password protected Access database

    Hi,

    how can i connect to an Access database that has a password on it

    When i use opendatabase("<Mypath>",,,"pwd=<MyPassword>") it says that my password is incorrect (and i'm sure it is not.

    PS i know how to do this with ado, but it is a program that is already written and now we have to change it so the database has a password on it.

    Thanx


  2. #2
    Join Date
    Apr 2002
    Posts
    13

    Re: DAO password protected Access database

    Tell me the code. I would like to know whether u want to do this in VB/ASP


  3. #3
    Join Date
    Feb 2001
    Location
    PA
    Posts
    163

    Re: DAO password protected Access database

    Here is some old DAO code I came across. Try it out.

    Dim ws as Workspace
    Dim db as Database
    ' Open workspace, database, recordset
    set ws = DBEngine.Workspaces(0)
    ' Password protected
    set db = ws.OpenDatabase("DatabasePath", false, false, "MS Access;pwd=password")





Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured