4
Contributors
3
Replies
7
Views
7 Years
Discussion Span
Last Post by bhrain
0

in Data Link Properties

Click "All" Tab
then look for "Jet OLEDB:Database Password"
then click "Edit Value"

and there is a small window pops up
then in under "Property Value"
type the password of your database
then click "OK"

Attachments DBPass.JPG 151.42 KB
0

And here is another method of connecting to DB using ADODB connection using code.

Public Sub ConnectToDB()
    Dim CON As ADODB.Connection
    Dim CMD As ADODB.Command
    Dim conString As String
    
        conString = "DBQ=" & App.Path & "\Database.mdb" & "; Driver={Microsoft Access Driver (*.mdb)};"
    Set CON = New ADODB.Connection
    With CON
        .ConnectionString = conString
        .Open , "Admin", "yourDBpassword"
    End With

End Sub

Public Sub DisconnectFromDB()

    Set CMD = Nothing
    
    CON.Close
    Set CON = Nothing

End Sub

ConnectToDB will connect to your database and DisconnectFromDB will disconnect it.
Thanks

0

Hello Every one! i'm trying to encrypt my ms access database using the encrypt tool in ms access2003. After i encrypt it, i want to decrypt it, using visual basic so that i could run my visual basic forms. Can somebody help me how to do it? Thank you very much in advance!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.