Paged Mode of DISPLAY ARRAY
The previous example retrieves all the rows from the customer table into the program
array prior to the data being displayed by the DISPLAY ARRAY
statement.
Using this full list mode, you must copy into the array all the data you want to display.
Using the DISPLAY ARRAY
statement in paged mode allows you to provide data
rows dynamically during the dialog, using a dynamic array to hold one page of
data.
The following example modifies the program to use a SCROLL CURSOR
to retrieve
only the store_num
values from the customer table. As the user scrolls
thru the result set, statements in the ON FILL BUFFER
clause of the
DISPLAY ARRAY
statement are used to retrieve and display the
remainder of each row, a page of data at a time. This helps to minimize the possibility
that the rows have been changed, since the rows are re-selected immediately prior to the
page being displayed.