Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Closing client connections to network executable
Message
From
10/11/2002 10:32:58
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00720562
Message ID:
00720748
Views:
9
Hi Darrell.

>how do I automatically kick everyone else out of the vfp exe?

I do this using a timer that has Interval set to 60000 (one minute) and is a member of my global application object. When the timer fires, it looks for the presence of a file that doesn't normally exist called SHUTDOWN.TXT. If this file exists, the timer displays a message to the user that the app will shutdown in 2 minutes for maintenance, so please finish what they're doing and exit. It then starts a different timer with Interval set to 120000 (2 minutes), disables itself (so it doesn't check for that file again), and returns. This gives control back to the user for a couple of minutes. When the second timer fires two minutes later, it does some cleanup stuff (like TABLEREVERTing any open buffered tables and rolling back any existing transactions), then does a QUIT. The startup program also checks for the existence of this file, and if the user isn't the administrator, tells them that the app is in maintenance mode right now and then exits.

So, when we need to do maintenance, we simply create a file called SHUTDOWN.TXT (with no contents) and wait for a few minutes. After the maintenance is done, delete that file and email all users that they can get back in.

Doug
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform