|
-
Sep 28th, 2010, 11:48 PM
#1
Thread Starter
New Member
Failed in accessing Ms Access2003 password protected database within visual basic 6
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;Data Source=" & mypath & "employee.mdb"
.Open
End With
End Sub
-
Sep 29th, 2010, 12:52 AM
#2
Lively Member
Re: Failed in accessing Ms Access2003 password protected database within visual bas
Hi, I'm not an expert by any stretch of the imagination, and I'm not familiar with access databases.
That said, I'd have a look at:
http://connectionstrings.com/access
and check that the actual connection string is correct first.
You do not seem to have specified any username/password in your string...
I suspect you need to use something like:
Code:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb;Jet OLEDB:Database Password=MyDbPassword;
, or one of the other connection strings in the above link that is appropriate to your situation.
Failing that, can you access the database if you temporarily remove the password?
Hope this helps...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|