Link to home
Start Free TrialLog in
Avatar of horstuff
horstuff

asked on

scheduled .mdb compact thinks somebody is still using so won't run

access 2000

I have a scheduled compact that runs from a .bat file which sometimes works fine, other times it says "You have attempted to open a database that is being used by bla bla" or something like that. We have a small lan, about 10 pc's, and the error message seems to randomly think that one of them is still connected to it. I am SURE that nobody is, that Access is closed completely by a kill .bat file, etc. In other words, it seems to me that the server still THINKS that somebody is connected to it. Any ideas? Thanks.
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Have your bat file kill the .ldb file if it exists before compacting.  Sometimes if a user is forced to exit Access, the .ldb locking file will remain instead of being deleted when the user exits normally.

Hope this helps.
-Jim
jim's solution will work ...up to a point ...it is still possible that a user will be seen by the server as being connected even when ldb file is deleted....this is OS related as opposed to access related (which is jim's answer)

I'm looking for a way to close an open file programmatically...i post back in a bit
Avatar of horstuff
horstuff

ASKER

kill the .ldb on the server where the compact is trying to take place?
ASKER CERTIFIED SOLUTION
Avatar of SidFishes
SidFishes
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial