Drop rows from the row buffer.
void dbclrbuf(dbproc, n) DBPROCESS* dbproc; DBINT n;
A pointer to the DBPROCESS structure that provides the connection for a particular front end/server process. It contains all the information that DB-Library uses to manage communications and data between the front end and server.
The number of rows you want cleared from the row buffer. If you make n equal to or greater than the number of rows in the buffer, all but the newest row will be removed. If n is less than 1, the function call is ignored.
None.
DB-Library provides a row-buffering service to application programs. You can turn row buffering on by calling dbsetopt(dbproc, DBBUFFER, n) where n is the number of rows you would like DB-Library to buffer. If buffering is on, you can then randomly refer to rows that have been read from the server, using dbgetrow. See the dbgetrow reference page for a discussion of the benefits and penalties of row buffering.
The row buffer can become full for two reasons. Either the server has returned more than the n rows you said you wanted buffered, or sufficient space could not be allocated to save the row you wanted. When the row buffer is full, dbnextrow returns BUF_FULL and refuses to read in the next row from the server. Once the row buffer is full, subsequent calls to dbnextrow will continue to return BUF_FULL until at least one row is freed by calling dbclrbuf. dbclrbuf always frees the oldest rows in the buffer first.
Once a result row has been cleared from the buffer, it is no longer available to the program.
For an example of row buffering, see the sample program example4.c.