CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8

Thread: DB Password

  1. #1
    Join Date
    Sep 1999
    Posts
    14

    DB Password

    Hi,

    I've secure my database with an admin Password. Now i want to access the Database external via VB. How can i tell Access the password for the database?
    I've tried the described method, putting the password in the connect property of the bound data control, but it doesn't work.

    Any Ideas?



  2. #2
    Join Date
    Sep 1999
    Posts
    3

    Re: DB Password

    Hello,
    If u use ADO and OLEDB to access Access DB, use the property "Jet OLEDBatabase Password" of the Jet OLEDB.


  3. #3
    Join Date
    Sep 1999
    Posts
    14

    Re: DB Password

    I'am using VB5 with the normal Data Control i'll bind it at runtime to an password protected Access Database. The Data Control does not have an property password


  4. #4
    Join Date
    Sep 1999
    Posts
    3

    Re: DB Password

    See the Connect property in the MSDN !


  5. #5
    Join Date
    Sep 1999
    Posts
    14

    Re: DB Password

    I put in the connect Property "UID=admin;PWD=test"

    I've tried some other variations but i always get the Message "Invalid Password".
    The Password was set directly in Access


  6. #6
    Join Date
    Sep 1999
    Location
    Germany
    Posts
    66

    Re: DB Password

    Hi,

    see answer on
    http://members.tripod.com/smalig/vb/079913.html

    Best Regards


  7. #7
    Guest

    Re: DB Password

    Try the following:

    Dim db As Database
    pwwd = password.Text

    Set dbs11 = OpenDatabase("c:\db.mdb", False, False, ";Pwd=" & pwwd)

    I ran into the same problem you are and I went round and round with it. It didn't work for me until I set the Password equal to a variable then used the opendatabase method with the aforementioned arguments.

    Hope this helps.


  8. #8
    Join Date
    Sep 1999
    Posts
    14

    Re: DB Password

    OK :-)

    The result now is that i get the Errormessage "ODBC Connectio to Database xxx failed"

    I don't know what i can do anymore :-(((


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