Consultor Eletrônico



Kbase P134542: FOR EACH .. BREAK BY skips records when using buffer for PROTECTED temp-table defined in inherited c
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/20/2010
Status: Verified

SYMPTOM(s):

FOR EACH .. BREAK BY skips records when using buffer for PROTECTED temp-table defined in inherited class

FOR EACH BREAK BY fails in OO4GL class method.

BREAK BY only returns some of the records in the FOR EACH loop.

Although the FOR EACH loop literates the correct number of times, not all records are AVAILABLE in the loop.

FACT(s) (Environment):

OpenEdge 10.1B
OpenEdge 10.1C
All Supported Operating Systems
OpenEdge Category: Language (4GL/ABL)

CAUSE:

Bug# OE00151472

CAUSE:

When using BREAK BY with a FOR EACH on a same named buffer for a temp-table in a method of a class which inherits from a class with originally defines the temp-table as PROTECTED, the FOR skips every other record in the table:
e.g.
CLASS parentClass:

DEFINE PROTECTED TEMP-TABLE myTT ...

END CLASS.


CLASS childClass INHERITS parentClass:

METHOD myMethod ():
DEFINE BUFFER myTT FOR myTT.
FOR EACH myTT BREAK BY myTT.field:

END.
END METHOD.

END CLASS.

FIX:

Upgrade to OpenEdge 10.2A or later

To workaround this do one of the following:
- Define the buffer for the temp-table with some name other than the original tt name
- Use a Dynamic Query with the BREAK BY