Unable to connect to a secured access database

tallg

New member
Joined
Dec 16, 2005
Messages
4
Programming Experience
10+
I'm having a problem with VB.NET and Access 2000 database. I cannot seem to connect to database if it has a database password. I try to connect through different ways with no luck.
First I created a UDL file and select Jet 4.0 as the provider. Then I pointed to the mdb file and typed the user id and password. Try the same within VB.NET oleDBconnection. Results are the same. Both cases it shows the following error message


"The connection failed because of an error in initializing provider. Cannot start your application. The workgroup information file is missing or opened exclusively by another user."

Although I cannot connected to a password protected database, I can use both methods successfully for unprotected databases.

Is there a difference between access database password and Jet password? In which case how can I use the Jet database pwd instead database password in UDL properties?

Do I need to install any additional components? Is there a way to fix this error. Please help.

Thanks in advance.
 
Thanks for your answer.

I can connect to the database uing that code but cannot login through any built-in wizards. The reason I need this is because for my crystal reports, I need to pass the login info when creating reports. I have set the jet database password when creating the report, but I do not know how to set the Jet database password through code.
I have passed the login details before I call the report as follows

With crConnectionInfo
.ServerName = "c:\TestDB.MDB"
.DatabaseName = "c:\TestDB.MDB"
.UserID = "Admin"
.Password = "test"
End With

Above code does not seem to pass the correct details to the report, In runtime it prompts me to re-type the password. At that point I cannot specify the Jet database password and therefore I cannot view any reports.

Do you know what's the reason why I cant login through dialogs?

Thanks again for your help.
 
Back
Top