Consultor Eletrônico



Kbase P69091: Error 565 or 138 updating a record using ADM
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   12/13/2004
Status: Unverified

SYMPTOM(s):

Error 565 or 138 updating a record using ADM1

Error: FIND FIRST/LAST failed for table . (565)

<TableName> record not on file. (138)

Error 565 happens using FIND FIRST or FIND LAST

Error 138 happens using only FIND

FIND Statement with NO-ERROR option still returns error

Debugger show that end-update procedure has ERROR-STATUS:ERROR = true

CAUSE:

Although, the error is being suppressed in the FIND statement with the NO-ERROR option, it is carried into the standard ADM1 procedure and displayed by adm-end-update procedure that handles logic errors.

FIX:

To make sure that an error is not propagated into the internal AM procedures, you need to set the ERROR-STATUS:ERROR to False before the Standard ADM1 call of the procedure you are overriding.
Fro example, the following code will raise the 565 error even with the NO-ERROR option:
FIND FIRST <table> WHERE <field> = <value that doesn't exist> NO-ERROR.
To keep the error from propagating into the ADM1 standard call, set the ERROR-STATUS:ERROR to False before the Standard ADM1 call:

FIND FIRST <table> WHERE <field> = <value that does not exist> NO-ERROR.

IF ERROR-STATUS:ERROR THEN ERROR-STATUS:ERROR = FALSE.