Kbase P29935: CAN-FIND fails to find record defined in TEMP-TABLE defined LIKE another TEMP-TABLE
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  06/12/2007 |
|
Status: Verified
SYMPTOM(s):
CAN-FIND fails to find record defined in TEMP-TABLE defined LIKE another TEMP-TABLE
TEMP-TABLE defined LIKE another TEMP-TABLE
Additional fields added to the second TEMP-TABLE
Executing code similar to:
DEF TEMP-TABLE tCustomer NO-UNDO
FIELD CustCode AS CHAR INIT "A"
INDEX iCustCode IS PRIMARY UNIQUE CustCode.
CREATE tCustomer.
ASSIGN
tCustomer.CustCode = "A".
MESSAGE
"CAN-FIND:~t" CAN-FIND(FIRST tCustomer) "~n"
VIEW-AS ALERT-BOX INFO BUTTONS OK.
CAUSE:
This is expected the expected behavior. The reason the CAN-FIND returns NO is that the indexed field value is not being changed to force immediate re-indexing action. Indexing occurs immediately only when the value of an indexed field actually change.
FIX:
Apply RELEASE or VALIDATE or FIND before CAN-FIND, which will force indexing and writing of the records.