none
.laccdb lock retained after Access is closed? RRS feed

  • General discussion

  • I can't perform a compact and repair of our backend file because I'm prompted with a message saying my station is still in the database.  The .laccdb file is still retained even after I close all instances of Access.  Any ideas?
    Thursday, May 17, 2012 2:46 PM

All replies

  • w85 wrote:
     
    > I can't perform a compact and repair of our backend file because I'm
    > prompted with a message saying my station is still in the database.  The
    > .laccdb file is still retained even after I close all instances of
    > Access.  Any ideas?
     
    The obvious first: Is anyone else connected to this accdb?
     
    Do you have permission to delete files from that folder? You need to,
    otherwise Access can't delete the .laccdb file.
     
    --
    Peter Doering [MVP Access]
     
    Thursday, May 17, 2012 3:09 PM
  • Have you tried manually deleting it, what happens?

    Is this a one time occurance, or it always remains?


    Daniel Pineault, 2010 Microsoft MVP
    http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net

    Thursday, May 17, 2012 3:09 PM
  • Everyone was out of the database, and the message saying I couldn't perform compact and repair gave my station number as the station that was still in the database!

    I am allowed to create and delete files in the folder the backend and .laacdb are stored in.

    If I try to delete the .laccdb I get the message:

    "Cannot delete ...: It is being used by another person or program.

    Close any programs that might be using the file and try again."

    I've never had this problem in the past year and a half I've been using Access.

    Thursday, May 17, 2012 3:53 PM
  • w85 wrote:
     
    > If I try to delete the .laccdb I get the message:
    >
    > "Cannot delete ...: It is being used by another person or program.
    >
    > Close any programs that might be using the file and try again."
    >
    > I've never had this problem in the past year and a half I've been using Access.
     
    Are you using automation? If so, are you closing/destroying all references
    after use?
     
    When you go into task manager, how many MSAccess.exe do you see in the list
    of processes?
     
    --
    Peter Doering [MVP Access]
     
    Thursday, May 17, 2012 3:57 PM
  • What version of Access are you using?

    ----

    Look in the task manager for on the Processes tab for an instance of MSACCESS.EXE, if there is, then kill it ("End Process").  The trick is to figure out what caused the "ghost" instance of MSACCESS.EXE in the list of Processes.  Back in the day, there was a bug related to implicit comparison to a control in an If .. Then construct ...

    If someChkBoxContol Then
       'Do Something
    End If

    The solution was easy ... just explicitly compare the control ...

    If someChkBoxContol = True Then
       'Do Something
    End If

     (edit: doh! ... with the mention of .laccdb you must be useing A2007 / A2010 ... so that issue should not be present any longer, but since it was a bug at one time, I explicitly compare in my If..Thens as a general practice.)


    Brent Spaulding | Access MVP


    Thursday, May 17, 2012 4:16 PM
  • If you cannot delete it then there is truly an instance which has kept an session alive somewhere, and if it gives you PC as the culprit then I'd suspect that you have a process still alive (even if it does not show on your task bar).  Close Acess, then open your task manager and see if you can find an instance of msaccess.exe and end each process with that name.  Then try again.

    Daniel Pineault, 2010 Microsoft MVP
    http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net

    Thursday, May 17, 2012 4:24 PM
  • Those were my thoughts too.  After closing all instances of Access I checked the processes tab in the Task Manager to see if any ghost instances of MSACCESS.EXE were running, none were.

    I'm using Access 2007.

    Thursday, May 17, 2012 5:08 PM
  • As with any computer problem, have you tried a reboot?

    Also, if this file is on the server, the admins can tell you who has it open.


    Daniel Pineault, 2010 Microsoft MVP
    http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net


    Thursday, May 17, 2012 6:09 PM
  • I've rebooted several times, same problem.

    I haven't spoken with our network admins, but the message I'm getting from Access indicates its my station that is still in the file.

    Friday, May 18, 2012 1:37 PM
  • Shutdown your computer, then try on some else's computer.

    But at this point, I'd see with the Server admin to see who is listed on the lock file.


    Daniel Pineault, 2010 Microsoft MVP
    http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net

    Friday, May 18, 2012 2:46 PM
  • I've rebooted several times, same problem.

    I haven't spoken with our network admins, but the message I'm getting from Access indicates its my station that is still in the file.

    Since you've tried all the usual things with no cure, you might try this:

    Copy the file to a local folder and compact it. You might be able to over-write the existing file with the new compacted one. If not, do the last ditch effort of importing everything into a new database and retire the old one.


    Bill Mosca
    http://www.thatlldoit.com
    http://tech.groups.yahoo.com/group/MS_Access_Professionals

    Friday, May 18, 2012 3:19 PM
  • Good idea Bill!  I completely overlooked the obvious.

    Daniel Pineault, 2010 Microsoft MVP
    http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net

    Friday, May 18, 2012 3:25 PM
  • Good idea Bill!  I completely overlooked the obvious.

    Daniel Pineault, 2010 Microsoft MVP
    http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net

    Thanks, Daniel. I'm sure I've picked up at least as many ideas from you as you from me.

    I had to deal with rogue locking files for years with a shared Access 2.0 database. They drove me crazy. Finally, one of the netowrk guys in our department put a file killer app on my computer. When I ran into a hung LDB I just killed it. Sloppy but effective.

    Eventually, I lost that power due to security tightening so I had to come up with a better method until I could convert the database to a properly split one.


    Bill Mosca
    http://www.thatlldoit.com
    http://tech.groups.yahoo.com/group/MS_Access_Professionals

    Friday, May 18, 2012 5:29 PM
  • Definately a good suggestion from Daniel.  Also, I would suggest that you use the utility named Who's Connected to find our for sure the computer that is holding the file.  I have added the utility to my SkyDrive public folder (click here), or you are a member of UtterAccess, you can d/l the utility there by clicking here.

    The utility will let you know what computer (and the logged in user if you have permission to see that info) is connected to that db in question.  I would be interested in the result when you have your computer shut down.


    Brent Spaulding | Access MVP

    Friday, May 18, 2012 5:43 PM
  • Also remember that anyone with Excel open which is currently accessing data in your database is ALSO in the laccdb - probably as Admin.

    You need to get them out of the pool as well.

    Happened to me

    Ian Fry


    Ian Fry Fry Systems Pty Ltd Adelaide, Australia

    Tuesday, February 10, 2015 11:49 PM
  • Sorry to be late on this, but I wanted to post my help in case this happens again. This has occurred to me several times throughout our network before.

    Solution: 1st. Reboot Computer. While it's rebooting Disconnect your Ethernet Cable or turn off your Wi-Fi. That will "Force" your connection to be lost completely thus removing the locking file.

    This has been the best and most consistent solution when we come across that. Other option is Utilize SQL Server Management Studio to House all your Table as Back End and you wont have issues like that (combining Access with SQL Server makes for some pretty cool applications)

    Wednesday, January 13, 2016 2:43 PM
  • You need to remove all locks to the file.

    If they are from other network users: open Computer Management > Shared Folders > Open Files and right click to close it.

    Wednesday, January 4, 2017 2:37 PM
  • This worked beautifully!

    Thank you, Hugo!

    Wednesday, February 27, 2019 8:54 PM
  • Merci Hugo!!  Worked very well.  Using this method, I was able to find a user who had 11 locks on the same database.  Not sure what he was doing but we'll soon find out.  Many years ago, I had to use the method that Bill Mosca suggested (above) and this is so much faster. 

    Thanks again.


    JohnMc

    Tuesday, August 27, 2019 2:47 AM