Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to a Microsoft Access Database

Status
Not open for further replies.

Coxylaad

Programmer
Jan 27, 2004
155
GB
Hi,
I have searched the forum but I cant find the information I am looking for so here goes:

I am writing a VB.net app that is going to use a microsoft access 2000 mdb file to store its data.

The problem is this: I can connect to the mdb fine when there is no password present for it, but as soon as I add a password to secure it I get the following error when I try to connect:
"Test connection failed because of an error in initializing provider. Cannot start you application. The workgroup application file is missing or opened exclusively by another user."

I have tried creating a workgroup withuser accounts etc but I keep getting the same error.

Any ideas as to how to overcome this??

Thanks

Ian Cox
 
Do you supply the username/password in the connection string?

Mark [openup]
 
this may sound stupid, but do you actually have your mdb open? if so, close it and then try connecting to it...
 
weirdly enough I have gotten round the problem by setting the password of the default username Admin to something, then providing an empty password in the connectionstring.

God knows why but it works and people need a password to access the database directly so I am happy

Thanks for your help

Ian
 
That doesn't seem right. What is your connection string?

And having the database open doesn't affect anything when using it in your program, unless you are modifing a tables structure.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top