dbclrbuf

Clears rows from the row buffer.

Syntax

void dbclrbuf (
PDBPROCESS
dbproc,
DBINT
n );

where

dbproc
Is the DBPROCESS structure that is the handle for a particular workstation/ SQL Server process. It contains all the information that DB-Library uses to manage communications and data between the workstation and SQL Server.
n
Is the number of rows you want cleared from the row buffer. If n is equal to
or greater than the number of rows in the buffer, all but the newest row are
removed. If n is less than 1, the call is ignored. Rows are cleared on a first-in/first-out basis.

Remarks

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. DB-Library for C can buffer rows as they are returned from SQL Server. If buffering is on, you can refer to buffered rows that have been read from SQL Server using dbgetrow.

The row buffer can become full if SQL Server returns more than the n rows that you said you wanted buffered. The row buffer is full when dbnextrow returns buf_full. Once the row buffer is full, dbnextrow continues to return buf_full until at least one row is freed by calling dbclrbuf. The dbclrbuf function frees the oldest n rows in the buffer.

See Also

dbgetrow, dbnextrow, dbsetopt; Bulk-Copy Functions and DB-Library Options