I've worked with semaphore locks before and it just seems like a little overkill (and too much clean) up to mess with in this situation.
Anyway, here's what I came up with to get the list of currently logged in users, er locked records. It seems to work well.
Thanks for the help everyone!
*-----------------------------------------------------------------------------
*--Gathers All Records Locked by this or any other workstation.
*-----------------------------------------------------------------------------
lnWasSel = SELECT()
lnWasReProc = SET('REPROCESS')
SET REPROCESS TO 1
SELECT * FROM DBF() WHERE l_IsLocked() ;
INTO CURSOR c_AllLocks
SELE (lnWasSel)
SET REPROCESS TO (lnWasReProc)
*-----------------------------------------------------------------------------
*--Determines whether a record is locked by us or any other user.
*-----------------------------------------------------------------------------
FUNCTION l_IsLocked()
*
llRetVal = .T.
IF ! ISRLOCKED()
IF RLOCK()
UNLOCK RECORD RECNO()
llRetVal = .F.
ENDIF
ENDIF
RETURN llRetVal
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