Hi I'm devolping a project in which backend is ms access and front end is vb 6.0. For security reasons i made the ms access as password protected. when i tried to connect the vb and access, the following message is displayed. How to handle it? Please help me..

Recommended Answers

All 3 Replies

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"

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
    Set CON = Nothing

End Sub

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

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!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.