Kbase P22587: How to determine whether the record is locked when using a 4
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  15/12/2003 |
|
Status: Unverified
GOAL:
How to determine whether the record is locked when using a 4GL FIND statement.
FIX:
You must use the LOCKED function as shown below. Also note the usage of NO-WAIT and NO-ERROR on the end of the FIND statement. This is so that you don't receive an error during the FIND and therefore you can process the error afterward using the LOCKED function.
FIND customer WHERE customer.custnum = 50 EXCLUSIVE-LOCK NO-WAIT NO-ERROR.
IF LOCKED customer
THEN MESSAGE "Customer record is locked." VIEW-AS ALERT-BOX.
ELSE DISPLAY CustNum Name.