Auto compact and repair and lockfile

grunners22

Registered User.
Local time
Yesterday, 18:31
Joined
Aug 25, 2005
Messages
30
Hi all

I'm about to start on a new project - automatically compacting and repairing our databases every evening. I am confident that I can do this (just!), my only issue is deleting the lockfile in case any users have forgotten to log off the databases before they have left.

Obviously I will be unable to carry out the C & R if users are still logged in. Does anyone have any ideas as to the best way to tackle this?

Any help greatly appreciated!
 
If it exists then delete [kill] it. You will not be able to delete the ldb file if a computer still has a lock on the file.

Code:
    If Dir("X:\Database.ldb") <> "" Then
        Kill "X:\Database.ldb"
    End If

You should incorporate a Detect Idle Time function into your db and close it if the user has not done "something" within the last 60 minutes and close the db for them. Search the forum for the topics have been asked and answered before.
 
That helps, thanks.

But do you however know of a way to, say, shutdown a computer that is connected?

Thanks
 
grunners22 said:
That helps, thanks.

But do you however know of a way to, say, shutdown a computer that is connected?

Thanks
Search around for I know that topic was discussed before.

The advance Search feature of this forum is a great tool to discover and learn the answers to your Access programming questions.
 

Users who are viewing this thread

Back
Top Bottom