Application being left open

mdjks

Registered User.
Local time
Yesterday, 22:02
Joined
Jan 13, 2005
Messages
96
I have a shared 2000 db and for the last few days someone has been leaving it open. In '97 you could open the .ldb file and see who it was, is there a way to find out in 2000?

Also, I have seen something on remotely removing users who leave the application open but can't find it now. Does anyone know how this is done? The data must be refeshed daily and hasn't been for the last four days due to this lock.
 
The .LDB file is just a database file, too. You should be able to open it and look at the tables. (They are hidden, so you might have to muck your options a bit to see hidden objects.)

The usual way to control users is a startup form that either is part of your switchboard (if that's what you have) or looks like a company logo. If the latter, don't close the logo. Instead, minimize it and hide it.

In the form's OnLoad routine, check some obscure table that might be hidden or even external to the main .MDB to see if you have updated some obscurely-named table to have a record with an obscurely spelled keyword that says "Send Everyone Away." Make the code also check that it doesn't kill itself if you use a hidden table in the same MDB file. But if it is external, that isn't needed. Anyway, once this code is set, make every person trying to log in just go away. DoCmd.Quit works here.

Then in the same OnLoad routine, set up the form's Timer. In the OnTimer routine, query that same table for the same condition once per minute or so. Again, DoCmd.Quit works fine to kill the app.

Now, when you need to force everyone out of the DB, go into the OTHER database file, add this obscure record to the obscure table, and exit. This OTHER MDB doesn't have the startup form so you can update the obscure table without having to log in to the closely protected MDB file.

If you did this right then, within no more than a couple of minutes, everyone should be out. Now if you have an .LDB file, it is a leftover. Kill the file, remove the obscure record value, and do your edit, update, or whatever.

Perhaps as a wrinkle to this, you can have two codes. One that kills everyone and one that won't kill members of the Admins group. That way you can do the update in isolation and can update a hidden table in the same MDB as the you had to update. This is a style choice.
 

Users who are viewing this thread

Back
Top Bottom