Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How many users are running the application now?
Message
De
13/06/2007 21:31:33
 
 
À
04/01/2007 08:21:01
Hee Lim Wang
Fantasy Software Enterprise
Malaisie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01182163
Message ID:
01232837
Vues:
11
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform