Error connecting to Access database

aliweb

Active member
Joined
Sep 14, 2005
Messages
40
Programming Experience
3-5
Hello

I have added a dataset in my project named Dataset1.xsd. Then I try to create a connection with password protected Access database but when I press the Test Connection button it gives the following error:

Test 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.

I am using Microsoft Jet 4.0 OLE DB Provider.
Check the attached screenshot.

For the past 4 days I am trying to find an example which uses Crystal Report with password protected Access database. Most of the examples are of SQL Server and even if there are some of access they do not work. When I use connection from within the Crystal Report then it works fine but when I run the report it asks for password.
frown.gif
Can anyone just send me a simple example using crystal reports and password protected access database that doesn't use ODBC.
 

Attachments

  • screenshot.JPG
    screenshot.JPG
    92.6 KB · Views: 234
For god's sake you have established a conn for server instead for an Access file/DB ... go in "Server Expolorer" and remove an exisiting conn and right click the "Data Connection" choose "Add/Remove database" and make a conn for Jet Engine (Access (*.mdb)). Add password when it asks inside Jet Engine Password field and then try again ... i beleive this error msg will not appear again.

Regards ;)
 
Ok when I right click on Data Connection in Server Explorer there is no "Add/Remove Database" but "Add Connection". When I click on it, opens the same screen which you can see in my previous sceenshot. A list of providers is opened and there is no provider as "Jet Engine" but :Microsoft Jet 4.0 OLE DB" which I have already used and this is what is giving me error.
What do I do now?
 
Ok I did exactly as you said. Deleted the previous connection and made a new one. Fine this far but when I ran the report a screen pops up and is asking for password.:D
I am attaching my application. Also see the screenshots. The database password is 123

One more question is right now database is present at the following path

C:\Documents and Settings\.........\Example\data1.mdb

Now if I move my application to some other path for e.g. D:\Example\data1.mdb will it work? Will the dataset automatically adjust the database path?
 

Attachments

  • screenshot1.JPG
    screenshot1.JPG
    90.1 KB · Views: 223
  • screenshot2.JPG
    screenshot2.JPG
    76.9 KB · Views: 217
  • Example.zip
    25.9 KB · Views: 28
Back
Top