Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
User Locking problem
Message
De
12/07/2006 18:23:27
 
 
À
12/07/2006 05:12:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01135587
Message ID:
01135883
Vues:
14
Agnes:

I setup a .dbf file that contains one record for each user that logs in. When the user starts the application a new record is created and locked for the duration of the user's session. Once the user logs out the record is unlocked. If the user's session terminates abnormally the server will release the lock. In my application I simply count the number of locked records and compare the count to the license limit. There is some additional code that cleans up the file when the opportunity arises and removes old records.

Dunno if my explanation is clear. FWIW, been using this approach for 15 or more years without a problem. The part I like is the OS automatically removes the user from the "active" list by releasing outstanding record locks when their session ends, whether through normal program termination or a program failure.

Scott
Scott Ramey
BDS Software
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform