list_more

Fetches data for a list.

Available in:

Apps (win) Apps (char) Reportwriter RPC Standalone PL
X X X X X

Syntax

void list_more(list-name,limit,clear)
list           list-name
int            limit,clear

Description

list-name specifies the list to populate.

limit specifies the most rows that can be fetched.

clear can be true or false. If true (nonzero), the function overwrites existing data. If false (0), the function appends new data to the list's existing data and sets the current item pointer to the first row of the new set of data.

Example

Prints the first column of five rows, then fetches two more rows and appends that data to the list. Finally, it fetches two more rows and overwrites the previous data.
{
 list xx, yy;
 int i;
 xx = list_open("SELECT * FROM staff", 5);
 for (i=list_rows(xx);i;i--) printf(list_read(xx,0));

 list_more(xx, 2, false);
 list_seek(xx,0);
 for (i=list_rows(xx);i;i--) printf(list_read(xx,0));

 list_more(xx, 2, true);
 list_seek(xx,0);
 for (i=list_rows(xx);i;i--) printf(list_read(xx,0));
 list_close(xx);
}