AHA!

SET VAR vTableLocks VARCHAR = (CVAL('TABLELOCKS'))

Returns only LOCAL table locks!

Karen's method to test for *remote* locks on a table is to:
SET LOCK TableName ON
and test for non-zero error.  (My opinion is that determining a condition by testing for its error is not a best practice.)

Also, SET LOCK TableName ON is cumulative; if you run it 3 times, you need to run SET LOCK TableName OFF 3 times.  I'm not sure of the logic of that.  If a table is locked once, why would you want to apply multiple locks to it? That means to having to run something like the following to clear all LOCAL table locks :
LABEL TestLocalLock
CLEAR VAR vTableLocks
SET VAR vTableLocks VARCHAR = (CVAL('TABLELOCKS'))

IF (SLOC(.vTableLocks,'TableName')) <> 0 THEN
  SET LOCK TableName OFF
  GOTO TestLocalLock
ENDIF

Thanks Karen, Dan and Tony for your responses.
I've submitted an RDCC enhancement for (CVAL('TABLELOCKS')) to include remote locks.

Doug
RBX.5E current

--
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- You received this message because you are subscribed to the Google Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/3a838468-92c2-ac45-2df4-827d0e8f7178%40wi.rr.com.

Reply via email to