Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to know this is the last user?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01532350
Message ID:
01532376
Views:
48
>>You could have a table with field that indicates if a user is logged in or not (like in a users.dbf table). Problem with that of course is if the application crashes, then the app probably won't update the table...but I'm sure there is a creative way around that...
>
>We use something like that, but locking the user or application's record (we use this when we do not want two instances of the same program running), so if the application crashes the record gets unlocked by the OS. With some tweaking it can be used to count how many applications are running, for example at start up you create and lock a record and save the PK, at log-out (or crash) you unlock that pk, so at any time you can count how many locked records exist for a user/application combination and those are the active ones.
>

How do you unlock the PK at crash time? I guess if you have a fairly bulletproof error handler you could do it there. But even that won't save you in the case of power outages and the like.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform