Opening a backend database from two different applications

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

Guest

I have a front end database application in MS Access 2000, which for purposes of discussion has an administrative part and a user part. I recently decided to experiment with trying to move the user part of the front-end, which services about 70 people to a .net application. I've implemented both a form and web version. My intent for the time being is to leave the administrative part which is more involved in MS Access which is used by only a couple of people.

The problem I'm running into is that multiple instances of each application (.net or MS Access) can access the backend database using individual connections as long as only that application is used, however if either application tries to open the backend database while the other application has an open connection it will complain about the backend being locked (or file already in use).

Does anybody understand why the files would only be locked files when accessed by different applications? Have I encountered a limitation with MS Access or is there a setting or work around that would allow me to use both front-end applications simultaneously?

Thanks for any input
Steven W
 
Not sure if you are open to using ADO.NET but if you use a OleDbDataAdapter
you won't have these locking issues.

--
W.G. Ryan MVP Windows - Embedded

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/community/newsgroups
Steven W said:
I have a front end database application in MS Access 2000, which for
purposes of discussion has an administrative part and a user part. I
recently decided to experiment with trying to move the user part of the
front-end, which services about 70 people to a .net application. I've
implemented both a form and web version. My intent for the time being is to
leave the administrative part which is more involved in MS Access which is
used by only a couple of people.
The problem I'm running into is that multiple instances of each
application (.net or MS Access) can access the backend database using
individual connections as long as only that application is used, however if
either application tries to open the backend database while the other
application has an open connection it will complain about the backend being
locked (or file already in use).
Does anybody understand why the files would only be locked files when
accessed by different applications? Have I encountered a limitation with MS
Access or is there a setting or work around that would allow me to use both
front-end applications simultaneously?
 
¤ I have a front end database application in MS Access 2000, which for purposes of discussion has an administrative part and a user part. I recently decided to experiment with trying to move the user part of the front-end, which services about 70 people to a .net application. I've implemented both a form and web version. My intent for the time being is to leave the administrative part which is more involved in MS Access which is used by only a couple of people.
¤
¤ The problem I'm running into is that multiple instances of each application (.net or MS Access) can access the backend database using individual connections as long as only that application is used, however if either application tries to open the backend database while the other application has an open connection it will complain about the backend being locked (or file already in use).
¤
¤ Does anybody understand why the files would only be locked files when accessed by different applications? Have I encountered a limitation with MS Access or is there a setting or work around that would allow me to use both front-end applications simultaneously?
¤
¤ Thanks for any input
¤ Steven W

This error is typically the result of a file permissions issue. Do the users opening this database
have create, read, write and delete access to the folder where the database resides?


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Yes I'm using ADO.NET and OleDbDataAdapter. I'm encouraged that you think it should work, which means something about my setup is not right. The one thing that I did not mention is that the database is secured, so my opening the database requires a system reference an mdw file. Again on their own each application can open multiple connections and access the database just fine.
 
I see Paul just replied - and I'm pretty sure he's right on the money.

--

W.G. Ryan, eMVP

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/community/newsgroups
Steven W said:
Yes I'm using ADO.NET and OleDbDataAdapter. I'm encouraged that you think
it should work, which means something about my setup is not right. The one
thing that I did not mention is that the database is secured, so my opening
the database requires a system reference an mdw file. Again on their own
each application can open multiple connections and access the database just
fine.
 
Thanks for responding Paul. Since each application is able to access the database on its own I question whether permissions play into the problem unless there were some type of sharing permission, in which case I would then question why the same application can successfully open multiple instances each with its own connection.

Steven W
 
¤ Thanks for responding Paul. Since each application is able to access the database on its own I question whether permissions play into the problem unless there were some type of sharing permission, in which case I would then question why the same application can successfully open multiple instances each with its own connection.
¤

The users of both applications will need to have full access to the corresponding .LDB file that is
created when the database is opened. It's possible that sharing this file between the apps is
creating a permissions problem.

Since both applications can independently support multiple users that would seem to rule out the
possibility that one is opening the database for exclusive access. Is this the case? That would be
the only other scenario that I can think of which would cause this particular error.

See if the following addresses your issue:

ACC97: "File Already in Use" Error Message When You Share an Access 97 Database on a Windows 2000
Server-Based Computer
http://support.microsoft.com/default.aspx?scid=kb;en-us;308633


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Paul

I can now feel officially dumb. The article you pointed me to referred to the users group permissions on the database folder which, I was really ignoring since I thought I was bypassing it by having the IUSR_ group with full permissions assigned to the folder and the application was being run as administrator. Anyway I looked at it again for the umpteenth time to finally notice that the users group did not have modify privileges to the database folder. Once that was checked both applications were happy.

I only had to told it was a permission problem 4-5 times. Thanks for the help.
Steven W
 
¤ Paul
¤
¤ I can now feel officially dumb. The article you pointed me to referred to the users group permissions on the database folder which, I was really ignoring since I thought I was bypassing it by having the IUSR_ group with full permissions assigned to the folder and the application was being run as administrator. Anyway I looked at it again for the umpteenth time to finally notice that the users group did not have modify privileges to the database folder. Once that was checked both applications were happy.
¤
¤ I only had to told it was a permission problem 4-5 times. Thanks for the help.
¤ Steven W

Happens to the best of us. Glad you got it working.


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Back
Top