DB Library for C

dbgetrow

Reads the specified row in the row buffer.

Syntax

STATUS dbgetrow (
PDBPROCESS
dbproc,
DBINT
row );

Arguments

dbproc

Is the DBPROCESS structure that is the handle for a particular workstation or Microsoft® SQL Server™ 2000 process. It contains all the information that DB-Library uses to manage communications and data between the workstation and SQL Server.

row

Is the number of the row to read. The first row returned from SQL Server is number 1.

Returns

One of four different types of values:

Remarks

The dbgetrow function sets the current row to a specific row and reads it. This function only works if the DBBUFFER option is on. Any specified binding of row data to program variables takes effect.

When buffering is not turned on, generally each row is processed in turn by repeatedly calling dbnextrow until it returns NO_MORE_ROWS. When buffering is turned on, dbgetrow allows the user to jump to any row that has already been read using dbnextrow and is still in the row buffer. Calls to dbnextrow after a dbgetrow call return rows in order, following the row read by dbgetrow.

See Also

Bulk-Copy Functions

DB-Library Options

dbbind

dbnextrow

dbclrbuf