home *** CD-ROM | disk | FTP | other *** search
- .Na "dbclrbuf"
- .Aa
- .Fu
- Drop rows from the row buffer.
- .Ih "row buffer, clearing"
- .Sy
- .Sf "void dbclrbuf(dbproc, n)"
- .Sp "DBPROCESS" "*dbproc"
- .Sp "DBINT" "n"
- .Co
- .Bl
- \*L provides a row-buffering service to application programs.
- You can turn row buffering on by calling
- \f2dbsetopt(dbproc, DBBUFFER, "n")\f1
- where
- .I n
- is the number of rows you would like \*L to buffer.
- If buffering is on, you can then randomly
- refer to rows that have been read from
- \*S, using
- .I "dbgetrow()."
- See the \f2dbgetrow()\f1 manual page for a discussion of the benefits and penalties
- of row buffering.
- .Bl
- The row buffer can become full for two reasons. Either \*S
- has returned more than the
- .I n
- rows you said you wanted buffered,
- or
- sufficient space couldn't be allocated to save the row you wanted.
- When the row buffer is full,
- .I "dbnextrow()"
- returns BUF_FULL and refuses to read in the next row from \*S.
- Once the row buffer is full, subsequent calls to
- .I "dbnextrow()"
- will continue to return BUF_FULL until at least one row is freed by calling
- .I "dbclrbuf()."
- \f2dbclrbuf()\f1 always frees the oldest rows in the
- buffer first.
- .Bl
- Once a result row has been cleared from the buffer, it is no longer
- available to the program.
- .Bl
- For an example of row buffering, see
- Example 4 in the \f2\*L Reference Supplement\f1.
- .Bz
- .Pa
- .Pi dbproc
- A pointer to the DBPROCESS structure that provides the connection
- for a particular front end/\*S process. It contains all the
- information that \*L uses to manage communications and data between the
- front end and \*S.
- .Pi n
- The number of rows you want cleared from the row buffer.
- If you
- make
- .I n
- equal to or greater
- than the number of rows in the buffer, all but the newest row will
- be removed.
- If
- .I n
- is less than 1, the function call is ignored.
- .in -.375i
- .Re
- .br
- None.
- .Sa
- dbgetrow,
- dbnextrow,
- dbsetopt,
- options
-