Try OpenEdge Now
skip to main content
ProDataSets
Advanced Events and Attributes : Buffer BATCH-SIZE and LAST-BATCH attributes : RESTART-ROW attribute
 

RESTART-ROW attribute

Similar to RESTART-ROWID, the RESTART-ROW attribute of the Data-Source object facilitates batching when filling a ProDataSet temp-table. Unlike RESTART-ROWID, which repositions the query to a ROWID, this attribute allows the FILL query to be repositioned to an absolute row number. This is the syntax for RESTART-ROW:

Syntax

RESTART-ROW ( row )
row is an integer expression indicating the absolute row number to reposition the query.
For example, setting this attribute is helpful when you are paging back and forth in a table and want to retrieve page 3. BATCH-SIZE is used to calculate the row where a given page begins, and RESTART-ROW is set to that value just before the FILL. This causes the FILL query to be repositioned to the correct page. For example, to get page 3 you set RESTART-ROW to (3-1) * BATCH-SIZE to fill the third group of records.
Note: When using either the RESTART-ROWID or RESTART-ROW attribute, record sort order must be the same on the client and the server, otherwise the attribute behaves incorrectly or not at all. So, when batching between client and server, it is important that the ordering of records is identical on both the client and the server, and that records being created on the client are added to the end of the table.