Results 1 to 3 of 3

Thread: ADO with password protected Databases

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Location
    Greenville, NC, USA
    Posts
    15

    Post

    Does anyone know how to use the ado data control with a password protected database. I have used the connection string wizard to create the connection and entered the password but the control will not authenticate to the database. If I remove the password it works fine. I have tried the Microsoft jet 3.15 and 4.0 ole db.


  2. #2
    Hyperactive Member
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    455
    Hello WandaB,


    Try this source:

    Set ProjectsDB = OpenDatabase(DbSettings, True, False, ";pwd=YourPassword")


    To change your password:

    ProjectsDB.NewPassword "OldPassWord", "NewPassWord")


    Good luck,

    Michelle.

  3. #3
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Lightbulb ADO with password

    Hi WandaB, I think this what you looking for...

    Assume SysDb is you database filepath.
    Code:
    Dim MyConn as ADODB.Connection
    Dim SysDB$
    Set MyConn = New Connection
    With MyConn
        .Provider = "Microsoft.Jet.OLEDB.4.0"
        .ConnectionString = "Data Source=" & SysDB & "; Jet OLEDB:Database Password= <Your Password>"
        .Mode = adModeReadWrite
        .Open
    End With

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