954,582 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Connecting VB with password protected ms access using adodc

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..
[IMG]http://i48.tinypic.com/ddyge0.jpg[/IMG]

Attachments sa.bmp (396.15KB)
seena_srini
Newbie Poster
1 post since Jun 2010
Reputation Points: 10
Solved Threads: 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.42KB
jp26198926
Newbie Poster
22 posts since Sep 2008
Reputation Points: 10
Solved Threads: 5
 

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

kinwang2009
Posting Whiz in Training
243 posts since Feb 2010
Reputation Points: 17
Solved Threads: 42
 

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!

bhrain
Newbie Poster
3 posts since Jun 2010
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You