locked
Access "file already in use" question RRS feed

  • Question

  • User-1387630685 posted

    At work, we have an Access database created by Access 2000, used as a backend for ASP.net. I can have Access 2000 open on the server and users can still use it all day long, with the one exception of if I edit the columns in a table. If I do that, it throws a locked error. At all other times, smooth sailing for all asp.net users.

    I was testing something at home and I have Access 2003 on my test server. The database is opening in "shared" mode, but I get a "file in use" error if, on the server, I just have the database open in Access 2003, not adding data to a table or editing columns or anything..just open. Close the database in 2003 and it starts working in my ASP.net app. This is a database only and there are zero forms for it in Access.

    Yes, I know...close the database in Access, dummy.

    My question is, did something change between 2002 and 2003?  I would just sort of like to know if this is by design or I'm doing something wrong. I don't think it is a permission error if ASP.net can open it as long as I don't open the database in 2003.

    Again, not life and death, I'm just curious?

     

    Jay

     

     

     

     

     

     

    Monday, May 23, 2011 10:04 PM

Answers

All replies

  • User2032267397 posted

    hi

     

    File already in use means the same file is accessing by another app.

     make sure that u didnt  open file in your MS access ar ms access process will be running in your system, go to task manager and end the process

     

     

    regards

    aswin

    Tuesday, May 24, 2011 12:22 AM
  • User-1387630685 posted

    make sure that u didnt  open file in your MS access

    Well, that was kind of my question to begin with, if you read it. I can have the database open (at work) in Access 2000 with zero problems, but get a "file in use" error from asp.net if I open it in 2003 (at home).

    Either something changed between 2000 and 2003 or at work we have a 32-bit system and at home I'm running on 64-bit w/ 32-bit MS Access installed and IIS running in 32-bit.

    If its 2000 vs 2003, boy did it make my life easier that work is too cheap to upgrade stuff.  Don't know...

     

     

     

     

     

     

     

     

     

     

     

     

    Tuesday, May 24, 2011 7:24 AM
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 25, 2011 1:33 AM
  • User-576912550 posted

    At work, we have an Access database created by Access 2000, used as a backend for ASP.net. I can have Access 2000 open on the server and users can still use it all day long, with the one exception of if I edit the columns in a table. If I do that, it throws a locked error. At all other times, smooth sailing for all asp.net users.

    Hi Jay,

    In Access, if you want to change structure(editing table column) of table, at that time you require exclusive permission on the file, it means if you want to change structure of your access file at that time you need to check sure that no other user or application (even same application) is not using (connected with) access file. If it so first of all you need to manually close all connections of that file than only you can change structure of file.

     

    Wednesday, May 25, 2011 5:41 AM
  • User-1387630685 posted

    In Access, if you want to change structure(editing table column) of table

    Understandable. But as I mentioned, at work (Access 2000), I can add data through Access while users are adding data through asp.net with zero errors. At home (Access 2003), I can't even have the database open, much less add data (to be clear, not editing column structure in either place).

    I don't think it is a permission problem because IIS/asp.net doesn't seem to be the problem here. What it seems like is that 2003 is opening the database exclusively even though I have it set to open in shared mode.

    But I did read the Microsoft link above and I did see something I can check when I get back home.  If it fixes it, I will mark whoever posted that link as giving the answer. The part from the link that has me wondering is:

    In order to open a database in shared mode, the Microsoft Jet database engine must be able to create a locking information file (*.ldb or *.laccdb) in the same folder as the database itself.

    I'm almost positive it has this ability, because I got errors from IIS writing to the database until I gave it these permissions.

    Thanks guys!

     

     

     

     

     

    Wednesday, May 25, 2011 9:05 AM
  • User-1387630685 posted

    I do not know what is going on. Got off work and came home to test permission issues. I checked IIS_WPG and it had everything but Modify permisisons...and I was not getting any "Operation Must Use An Updataable Query" errors, which I usually get if I don't set permissions correctly.

    Clicked Modify and the error went away. Yeah. But just to make sure, I unchecked the Modify permission for IIS_wpg (back exactly the way it was) and rebooted the machine, opened up MS Access 2003 and opened the table...went and tried my app from another machine...and still no error.

    I'm at a loss. I got the error 15 times before I posted a question. I only changed one permission, and I can't reproduce the error with that one permission checked or not checked?

    Oh well, I marked the microsoft link as the answer, because it was the most helpful link provided...though I'm still not 100% certain it was a permssion issue with IIS.

    Thanks

     

     

     

     

     

     

     

    Wednesday, May 25, 2011 8:47 PM