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
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only