Kbase 13518: UNDO of SHARED BUFFER gives Error 91, "no record available"
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/05/1998 |
|
UNDO of SHARED BUFFER gives Error 91, "no record available"
If a buffer is shared between two procedures, records put in the
buffer as result of a FIND may not be undone properly when an UNDO,
LEAVE block is present in the called procedure.
This results in the error: ** No <buffername> record available. (91)
The following code illustrates an example in Version 7, although the
problem exists in Version 6 as well.
main.p:
DEF NEW SHARED BUFFER shbuf FOR customer.
FIND FIRST shbuf NO-LOCK.
MESSAGE shbuf.name. /* This will be the name of the first customer
in the sports db: Lift Line Skiing */
RUN proc.p.
MESSAGE shbuf.name. /* If ENDKEY is pressed in proc.p, resulting
in an UNDO, LEAVE, the buffer shbuf will
be cleared of all contents (that is, it will
be empty.) It ought to still contain
the original record, Lift Line Skiing. */
proc.p:
DEF SHARED BUFFER shbuf FOR customer.
DEF VAR a AS CHAR NO-UNDO.
DEF VAR b AS CHAR NO-UNDO.
DO ON ENDKEY UNDO, LEAVE:
UPDATE a b
EDITING:
READKEY.
APPLY LASTKEY.
FIND LAST shbuf NO-LOCK. /* This will find "Spike's
Volleyball", the last record in
in the sports db. */
MESSAGE shbuf.name.
END.
END.
This problem is likely due to the way Progress is responding to the
NO-LOCK on the FIND statements. If the lock specification is
changed to EXCLUSIVE-LOCK, the buffer is restored as expected.
This bug has been logged with Progress Development and is currently
under investigation.
Progress Software Technical Support Note # 13518