Consultor Eletrônico



Kbase P178921: FOR EACH with BREAK BY skips newly created record
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   2/3/2011
Status: Unverified

SYMPTOM(s):

FOR EACH with BREAK BY skips newly created record

Procedure creates a number of new records followed by a FOR EACH ... BREAK BY

FOR EACH skip the last newly created record

FACT(s) (Environment):

All Supported Operating Systems
Progress 9.x
OpenEdge 10.x

CAUSE:


What appears to happen is that for the last CREATE executed, the write to the index keys gets delayed until the record is pushed out of the named buffer "abc". This results in the index keys not being available when the client populates the look-ahead buffer in the FOR EACH . With the index keys not there, this causes this buffer to skip over the record, and with that the entire FOR EACH skips over the record.

FIX:



The most reliable way to avoid this type of issue is to explicitly RELEASE the buffer after all records are created; this will force the last record out of the buffer, and with that forces the index keys to be written.