Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
More How many users on system
Message
 
 
À
30/06/2002 19:32:27
Jordan Pastourel
Worksafe Management Systems
Toowong, Australie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00673752
Message ID:
00673753
Vues:
21
Hi Jordan, we are using something similar that is an extension of what you have:

basically as each user logs in, they add a record to a table and RLOCK() it.
at the same time you can delete any unlocked records (crashes etc), you can also check number of users at this point and prevent access.

here is a simple example
* always do this in the same datasession
SET DATASESSION TO 1
SELECT ULOCKS
SCAN FOR RLOCK()
    * if you can lock it, no-one else is using it
    DELETE
ENDSCAN
APPEND BLANK
=RLOCK()
- Craig

"If you're not prepared to be wrong, you will never come up with anything original."
- Sir Ken Robinson
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform