Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
More How many users on system
Message
From
30/06/2002 19:47:02
 
 
To
30/06/2002 19:32:27
Jordan Pastourel
Worksafe Management Systems
Toowong, Australia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00673752
Message ID:
00673753
Views:
22
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
Previous
Reply
Map
View

Click here to load this message in the networking platform