dbcmdrow

DB Library for C

DB Library for C

dbcmdrow

Determines whether the current command can return rows.

Syntax

RETCODE dbcmdrow ( 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 to indicate that the statement can return rows.

FAIL to indicate that the statement can't return rows.

Remarks

dbcmdrow determines whether the current command is a Transact-SQL SELECT statement or an EXECUTE statement on a stored procedure containing a SELECT statement. Call dbcmdrow after dbresults returns SUCCEED.

Even if dbcmdrow returns SUCCEED, the statement will not return any rows if none have qualified. To determine whether any rows are actually being returned, use dbrows.

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

See Also

dbnextrow

dbrows

dbresults

dbrowtype