>>>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.
Hi Mike,
At crash time the records locked by the crashed application are closed by the OS, not sure how it knows, but it knows.
"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