Kbase P96495: How to use NO-ERROR with a dynamic FIND-FIRST method?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/16/2008 |
|
Status: Unverified
GOAL:
How to use NO-ERROR with a dynamic FIND-FIRST() method?
FIX:
NO-ERROR option can be combined with FIND-FIRST method of the buffer object handle according to the following example:
DEFINE VARIABLE bh AS HANDLE NO-UNDO.
DEFINE VARIABLE answer AS LOGICAL NO-UNDO.
bh = BUFFER customer:HANDLE.
answer = bh:FIND-FIRST("WHERE custnum > 2", NO-LOCK) NO-ERROR.
This method will return TRUE if a record was found, FALSE if not. You can simply check the value of return variable (in this case "answer"), checking ERROR-STATUS is not necessary.
The FIND-FIRST() method is available in version 9.1D and higher.