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:
01532357
Views:
68
>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.

Hugo
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform