list_allFetches all rows that satisfy the SQL select statement into a window list. Syntaxvoid list_all(list-name) list list-name Description
The number of rows fetched in the query trigger is limited by the variable query_max which is set in trim.h to a default value of 50. When the user toggles down to row 51 a second fetch of 50 rows is returned from the database. This process is repeated until all rows satisfying the select predicate are copied into memory. list_all() ignores query_max and copies all qualifying rows from the database into memory. ExampleWhen saving a user's hit list, the structure numbers for all rows that satisfy the select criteria must be saved. list_all() is run to assure that all rows have been fetched from the database. The following trigger is used in a menu item called Save Hit List.
{
list distinct_list; list_all(window_name.wl); distinct_list= distinct_field(window_name.wl,@window_name.WYNO);
/* delete duplicate structure numbers*/
G.fname= filename(""); /* prompt user for filename */
if (G.fname) /* user entered fname & not cancel */
list_save(distinct_list,G.user_dir,"WR");/*parms=list,path,suffix */
distinct_list=NULL;
}
Updated 19 May 1999. Copyright DataAspects Corp. 1998-1999 |