Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
User Locking problem
Message
From
12/07/2006 18:23:27
 
 
To
12/07/2006 05:12:58
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01135587
Message ID:
01135883
Views:
13
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform