Connection to Access DB already in use

Stimulsoft Reports.NET discussion
Post Reply
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Connection to Access DB already in use

Post by Jennypi »

Hi all,

In one of my reports I need to connect to an Access DB.
Here is my connection string:

Code: Select all

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=database_name.accdb;Persist Security Info=False
It works very well, except when the DB is already opened through Access by somebody else.
Is there an additional parameter I can add to the connection string to bypass this access issue? I just want to have access to the data in read only mode to print some labels. I tried by adding:

Code: Select all

Mode=Read;
to the connection string, but it says "Impossible to lock the DB".

Thanks for your help.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Connection to Access DB already in use

Post by HighAley »

Hello.

We couldn't reproduce your issue.
What version do you use?
Please, send us step-by-step instruction how to reproduce the issue.

Thank you.
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Re: Connection to Access DB already in use

Post by Jennypi »

Thanks for your reply.
I'll try to explain better.
Stimulsoft is on a server on our network, here is the version information:
stimrep.JPG
stimrep.JPG (18.54 KiB) Viewed 1560 times
The DB (built on Access 2007) is on my local computer.

When the DB is not opened, I can successfully test the connection string:
db success.JPG
db success.JPG (23.21 KiB) Viewed 1560 times
Now I just open the DB with MS Access.
Then if I try again to test the connection string, I get an error message that the DB is already in use:
db error.JPG
db error.JPG (38.38 KiB) Viewed 1560 times
Same error if I add

Code: Select all

Mode=Read;
to the connection string, just before the "Persist security...".

Hope this helps.
Thank you.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Connection to Access DB already in use

Post by Alex K. »

Hello,

We couldn't reproduce your issue.
Can you please send us a test database on which reproduces the issue for analysis.

Thank you.
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Re: Connection to Access DB already in use

Post by Jennypi »

I could not reproduce it neither when I try to make an example for you!
So I'm thinking maybe the person opens the DB in exclusive mode, which would cause my connection to fail.
Could it be because of this?

Thanks.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Connection to Access DB already in use

Post by HighAley »

Hello.

It seems that the problem is in the file sharing in your network.
Please, check if your database file acceptable for several connections.

Thank you.
Post Reply