Developers community number 1 connection string reference
Loading ad...

Failed in accessing Ms Access2003 password protected database within visual basic 6

Posted 2010-09-29 07:56
by boycha mangang
in the Access Forum
sir,

The following is the extract written in the module . The access always failed when i tried to access ms access password protected database from within the visual basic 6. Displaying Datareport also get failed.
because of this, I have been stuck off for the last many months.
So, Pl. help me by giving the steps to be done . for this, thanking you in advance.


Public con As Connection
Public Sub Connection()
Set con = New Connection
mypath = App.Path
mypath = mypath & IIf(Right(mypath, 1) = "\", "", "\")
With con
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Database password=apple;Data Source=" & mypath & "employee.mdb"
.Open
End With
End Sub
Reply 2010-09-30 08:22
by Max Wikström
in the Access Forum
Hi

Substitute "Database Password"
with
"Jet OLEDB:Database Password"

That should do it. If still not working, please post error message.
Copyright © 2012 ConnectionStrings.com   |   All Rights Reserved   |   Powered by CSAS   |   Send feedback, articles, requests and more connection strings here.