There are 2 ways to interpret your question. You can only determine whether the record has been locked BY YOU. SYS(2011) will return one of the following:
"Record Unlocked" (You have not locked the record)
"Record Locked" (You have locked the record)
"Exclusive" (You have the table opened exclusively)
"File Locked" (You have locked the whole table)
The only way to determine if another user (or another instance of the program on the same computer) has locked the record is to try to lock it yourself and trap for failure.
HI
IF RLOCK()
** RLOCK() has returned true
** Record is now locked
** Record is available
** do your update
UNLOCK
ELSE
** RLOCK() has returned false
** Record is not available for locking
ENDIF
Note if SET REPROCESS TO AUTOMATIC locks the table indefinetely. Read help on SET REPROCESS command.
It is assumed the reprocess is set to 1 or some number or for few seconds..
Hope this helps ramani :-9
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.