n_flushtx2() - SQL interface


int n_flushtx2(se,tx,nrows,max);
SERVER  *se;
TX      *tx;
int     nrows;
int     max;

This function flushes up to nrows results from the specified SQL statement. This is useful for skipping a number of records from a SELECT. The max is an suggestion to the SQL engine of how many records you intend to read.

The return will be the number of records actually flushed if successful, or if an error occurred then the return will be a negative number of (-1 - rowsflushed). Reaching the end of the results is not considered an error, and will result in a return less than nrows.



                                                     /* setup query */
              "select name from customer where lastorder<'1990-01-01';"
      n_flushtx2(se,tx,10,10);           /* ignore first 10 results */

Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.