Returns the number of the first row in the row buffer.
DBINT dbfirstrow ( PDBPROCESS dbproc );
The number of the first row in the row buffer. The first row returned from SQL Server is number 1. Use this return value when making a call to dbgetrow.
If you are not buffering rows, dbfirstrow, dbcurrow, and dblastrow always have the same value: the current row number in the current batch. If you enable buffering by setting the DBBUFFER option, dbfirstrow returns the number of the row that is the first row in the row buffer. For example, if a query returns 100 result rows and you read 20 rows into the buffer using dbnextrow, dbfirstrow returns 1, regardless of which row is current. As the application processes and clears rows from the buffer using dbclrbuf and more data is read from the server using dbnextrow, dbfirstrow returns the number of the result row stored in the lowest (oldest) buffer location.
dblastrow returns the number of the result row stored in the highest (newest) buffer location.
Bulk-Copy Functions | dblastrow |
dbclrbuf | DB-Library Options |
dbcurrow | dbnextrow |
dbgetrow | dbsetopt |