Hi!
1. Create A Table : \\SERVER\LICENCES.DBF Fields (USER C(50),TIME T)
2. in your start app use COUNT FOR USER#SYS(0) AND RLOCKED() TO lnOnlineUsers 3. CREATE A RECORD or use the same one if not already found with USER=SYS(0), if not already locked in the Table (because a user should be able to use multiple Instances)
4. Lock the Record
5. If an app crashes the lock will automatically be released. Thats all.
Note:
- Speed up finding locked Records with "SET REPROCESS TO 0 SECONDS"
- Sys(0) is not useable for Terminal Client Sessions, because it will contain the same data in every session
Marvin Blase (tA-logistic Software GmbH)
You'll never notice the good things if you haven't seen the bad.