OE 11.3.0, sports2000 database (original).
Very strange. I want to sort on repname and get differences when I change only the batchsize. With 6 sorting is ok, with 7 not. See below for code and results. Is this a known bug solved in a later version?
DEFINE DATA-SOURCE srcSalesrep FOR Salesrep. DEFINE TEMP-TABLE eSalesrep NO-UNDO BEFORE-TABLE beSalesrepFIELD SalesRep AS CHARACTERFIELD RepName AS CHARACTER FIELD Region AS CHARACTERFIELD MonthQuota AS INTEGERINDEX SalesRep IS UNIQUE PRIMARY SalesRep.DEFINE DATASET dsSalesrepFOR eSalesrep. BUFFER eSalesrep:ATTACH-DATA-SOURCE(DATA-SOURCE srcSalesrep:HANDLE).
DATA-SOURCE srcSalesrep:FILL-WHERE-STRING = "WHERE TRUE BY repname".
BUFFER eSalesrep:BATCH-SIZE = 6. DATASET dsSalesrep:FILL().FOR EACH eSalesrep: DISP eSalesrep.END.BUFFER eSalesrep:DETACH-DATA-SOURCE().
Below with BUFFER eSalesrep:BATCH-SIZE = 7.
With no batch-size stting sorting does not work either.
-- Kind regards,
Houtzager ICT consultancy & development
I took a quick look.
The output that you are getting is using the primary index (SalesRep) for eSalesrep after the FILL() returns BATCH-SIZE on the data sorted by repname.
Is this the difference that you are referring to?
I hope this helps.
Thanks Edsel, I know that, but of course that does not help. :-)
IMO this is not a bug. This is how batching works with the FILL() method.
The order you displayed is because of the index on the temp-table:
INDEX SalesRep IS UNIQUE PRIMARY SalesRep.
I think the main question is what do you want do accomplish ?
Ah, of course, now I see. Dummy me. Thanks.
- See more at: community.progress.com/.../16443.aspx