dbrows

DB Library for C

DB Library for C

dbrows

Indicates whether the current statement returned rows.

Syntax

RETCODE dbrows ( PDBPROCESS dbproc );

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.

Returns

SUCCEED or FAIL.

Remarks

Call dbrows after dbresults returns SUCCEED. Note that dbrows should be called before dbnextrow; otherwise, dbrows returns an incorrect value. Use dbcmdrow to determine whether the current statement can return rows (that is, a Transact-SQL SELECT or EXECUTE statement on a stored procedure containing a SELECT statement).

Even if dbrows returns FAIL, you must still process the results by calling dbnextrow until it returns NO_MORE_ROWS.

See Also

dbcmdrow

dbresults

dbnextrow

dbrowtype