[AccessD] forced logout

Dan Waters dwaters at usinternet.com
Tue Feb 10 17:06:18 CST 2004


John,

I've done both, but without a class.

In one case, I want users out until I say it's OK to get back in.  Perhaps I
need to do some updating.

In the other case, the company's backup software might need to have Access
shut down to do the backup.  In that case I set a shutdown time before the
scheduled backup and a restart time after the backup.  This is also good to
do because (in A2K and AXP) the last person forced out triggers a compact
and repair.

To do this I have one boolean value in a small table, and two date/time
fields in the same table.  The front end main form has a 1 minute timer
event to check to see if the boolean value is false or the shutdown time has
arrived.  If so, a 'Shutdown in 5 minutes' form appears on the user's
screen.  If it's time to get kicked out at night, a 'Shutdown in 10 minutes'
form appears on the user's screen.

This has worked well for a few years now.

Dan

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, February 10, 2004 4:02 PM
To: AccessD
Subject: [AccessD] forced logout

I am almost finished with a class and a table to allow me to force a logout
of my users from  the db.  In fact it is all working now, the only remaining
question is "when do I let them back in".

Is anyone else doing this?  What is your answer?  My tendency is "keep
logged out between ThisTime and ThatTime", i.e. add a second time field to
the table that is the time to allow back in.

Anyone?

My current system uses:

usysTblShutdown:

SD_ID		- autonumber PK
SD_Name	- Shutdown name
SD_Time	- Time to shutdown
SD_Enabled	- THIS shutdown is enabled
SD_Warnings	- The number of warnings to display before forcing a
shutdown
SD_WarningTime	- the number of seconds between warnings

I have a form that my framework opens that initializes the framework, and
shuts it back down if the form tries to close.  Thus enabling a clean
shutdown regardless of anything other than perhaps a power failure.

I then use the timer for this form to call a method in my class which checks
whether to do the shutdown.  The class raises an event with every warning to
the user in case your app needs warning that a shutdown is imminent.  The
class also raises an event when it is finally time to actually do the
shutdown.

I will publish the whole in a demo database as soon as I handle the issue of
when to allow them back in.  All opinions welcomed then summarily dismissed.

;-)

John W. Colby
www.ColbyConsulting.com


_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list