Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How many users are running the application now?
Message
From
13/06/2007 21:31:33
 
 
To
04/01/2007 08:21:01
Hee Lim Wang
Fantasy Software Enterprise
Malaysia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01182163
Message ID:
01232837
Views:
12
>Hi
>Is there any function or command to check how many user is running the application now ?

I use this simple method:

(1) A special .dbf is setup for counting users.

(2) When a user starts the application a startup procedure adds a record to the file and locks the record.

(3) A count of active users can be determined by counting the number of locked records in the .dbf.

(4) When the user quits the application the file is closed which unlocks their record.

(5) If the application bombs the OS automatically releases any record locks.

(6) When logging in or out a procedure checks to see if there are any other
active users and if not all unlocked records are deleted and file is packed. This is the only housekeeping required.

There are probably more sophisticated methods but I'm kinda simple and this works.

Scott
Scott Ramey
BDS Software
Previous
Reply
Map
View

Click here to load this message in the networking platform