Consultor Eletrônico



Kbase P7726: Record Locking - How to Know Who Has the Record Using VST
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   1/1/2004
Solution ID: P7726

GOAL:

Record Locking - How to Know Who Has the Record Using VST

FACT(s) (Environment):

Progress 9.x

FIX:

VST are enabled by default in Progress 9.x.

The following example code uses the _file table:

DEF VAR wrecid AS INT.
DEF VAR wtable AS INT.

FIND customer WHERE cust-num = 15 NO-LOCK.
wrecid = RECID(customer).
FIND _file WHERE _file-name = "customer" NO-LOCK.
wtable = _file._file-num.
FIND FIRST _lock WHERE _lock-recid = wrecid
AND _lock-table = wtable
AND _lock-flag = "X" NO-LOCK.
DISPLAY _lock-usr _lock-name _lock-flag
WITH FRAME A.
FIND FIRST _connect WHERE _connect-usr = _lock-usr NO-LOCK.
DISPLAY _connect-usr _connect-name _connect-device
WITH FRAME b.