home *** CD-ROM | disk | FTP | other *** search
-
- 1 Version 4.0 -- 5/1/89 dbclrbuf
- ______________________________________________________________________
-
- NAME: dbclrbuf
-
- FUNCTION:
- Drop rows from the row buffer.
-
- SYNTAX:
- void dbclrbuf(dbproc, n)
-
- DBPROCESS *dbproc;
- DBINT n;
-
- COMMENTS:
-
-
-
-
-
-
-
- dbclrbuf Version 4.0 -- 5/1/89 2
- ______________________________________________________________________
-
- o DB-Library provides a row-buffering service to application pro-
- grams. 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
- SQL Server, using dbgetrow(). See the dbgetrow() manual page
- for a discussion of the benefits and penalties of row buffer-
- ing.
- o The row buffer can become full for two reasons. Either
- SQL Server has returned more than the 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, dbnex-
- trow() returns BUF_FULL and refuses to read in the next row
- from SQL 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
-
-
-
- 3 Version 4.0 -- 5/1/89 dbclrbuf
- ______________________________________________________________________
- frees the oldest rows in the buffer first.
-
- o Once a result row has been cleared from the buffer, it is no
- longer available to the program.
- o For an example of row buffering, see Example 4 in the
- DB-Library Reference Supplement.
-
- PARAMETERS:
- dbproc - A pointer to the DBPROCESS structure that provides the
- connection for a particular front end/SQL Server process. It
- contains all the information that DB-Library uses to manage
- communications and data between the front end and SQL Server.
- n - 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.
-
-
-
-
- dbclrbuf Version 4.0 -- 5/1/89 4
- ______________________________________________________________________
-
- RETURNS:
- None.
-
- SEE ALSO:
- dbgetrow, dbnextrow, dbsetopt, options
-
-
-
-
-
-
-
-
-
-
-
-
-
-