Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>IsRlocked() and Sys(2011) are deceiving. As Steve posted, you can't determine if someone else has a lock on the record or not. These functions only work locally. Also of note, is that they only work for the current datasession. So even if you have a a lock but it is in another form with a private datasession, it won't return the correct information.
>
>You really need to attempt to lock it with RLock() in order to get an accurate answer.
>
Especially since there is no penalty to RLock() - locking a locked (by same process) is no problem, and if your intent is to lock it once you know the status, then you get that in the operation too. Easy to UNLOCK() if locking isn't actually wanted.
It is also better for the next person doing maintenance in that they will not be deceived by the IsRLocked() coding.
>>Thanks a lot Cetin and Steve.
>>
>>Cetin's approach is what what I was looking for. Rlock function tries to lock and I only want to test for if it is locked ot not.
>>
>>Regards
>>
>>
>>
>>>>What function is used to test if a record is locked?
>>>>
>>>>Thanks in advance.
>>>>
>>>>Oscar Corte
>>>
>>>IsRLocked() and sys(2011).
>>>Cetin
Précédent
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