Problem connecting to password protected Access file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I am trying to connect to a password protected access file from VB.NET.
I have no problem in connecting to Access, if I remove the password.

This is what I am doing:
In the server explorer, I choose "Add a connection"
Choose "Microsoft Jet 4.0 OLEDB Provider" in the provider tab
Selected the access file in the next tab
Left Username as Admin and typed the password.
Now when I try to test connection, I am getting this error message:
"Test connection failed becaues of an error in initializing provider. Cannot
start your application. The workgroup information file is missing or opened
exclusively by another user".

I am 100% sure, the password is correct, the file is not opened by any one.
I also created a workgroup information file and saved it under the same
folder that the access db is in.

If I remove the access password, I am able to connect. After creating the
data connection, I protected the access file with password. Now when I try to
refresh the data connection from Server Explorer, I am getting a popup form,
that asks for password and PROVIDER STRING. I am not sure what the Provider
stirng is, so I am always getting the above mentioned error message.

I would really appreciate if some one could help me out.

Thanks
Karthik
 
¤ Hi
¤ I am trying to connect to a password protected access file from VB.NET.
¤ I have no problem in connecting to Access, if I remove the password.
¤
¤ This is what I am doing:
¤ In the server explorer, I choose "Add a connection"
¤ Choose "Microsoft Jet 4.0 OLEDB Provider" in the provider tab
¤ Selected the access file in the next tab
¤ Left Username as Admin and typed the password.
¤ Now when I try to test connection, I am getting this error message:
¤ "Test connection failed becaues of an error in initializing provider. Cannot
¤ start your application. The workgroup information file is missing or opened
¤ exclusively by another user".
¤
¤ I am 100% sure, the password is correct, the file is not opened by any one.
¤ I also created a workgroup information file and saved it under the same
¤ folder that the access db is in.
¤
¤ If I remove the access password, I am able to connect. After creating the
¤ data connection, I protected the access file with password. Now when I try to
¤ refresh the data connection from Server Explorer, I am getting a popup form,
¤ that asks for password and PROVIDER STRING. I am not sure what the Provider
¤ stirng is, so I am always getting the above mentioned error message.
¤
¤ I would really appreciate if some one could help me out.

If you are using user-level security (and not a database password) then you will probably need to
specify the path to the system.mdw (workgroup information file) in your connection string. If you
click on the All tab in the Data Link Properites dialog you can specify the path in the Jet
OLEDB:System database property.


Paul
~~~~
Microsoft MVP (Visual Basic)
 
Thanks Paul, but I am not using user level security. I thought if I use user
level security, the problem would be solved, but it doesnt look so.

So I removed the user level security.

Karthik
 
I have encountered the same problem and got help from ADO.net newsgroup,
below is the information I got:

"Try this string instead:
'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;Jet
OLEDB:Database Password=MyDbPassword;'.""

And it solved my problem,

Peter
 
¤ Thanks Paul, but I am not using user level security. I thought if I use user
¤ level security, the problem would be solved, but it doesnt look so.
¤
¤ So I removed the user level security.
¤

OK, so then if you're using a database password then it should be specified in the Jet
OLEDB:Database Password in the list on the All tab.

If you're not using any security then either Admin with a blank password, or no user ID and password
at all (on the Connection tab) should work.


Paul
~~~~
Microsoft MVP (Visual Basic)
 
Back
Top