Except when the OS coughs and the file seems to be open, not that unusual.
>>>>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.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement