Determines whether a stored procedure or a remote stored procedure generated a return status number.
DBBOOL dbhasretstat ( PDBPROCESS dbproc );
TRUE or FALSE.
Status numbers are returned only by stored procedures running on SQL Server version 4.2 or later.
The server returns stored procedure information (including any return status and parameter values) immediately after returning all normal results for that stored procedure. Process the normal results, and then call dbhasretstat after dbresults returns NO_MORE_RPC_RESULTS (for all stored procedures in a batch except the last one) or NO_MORE_RESULTS (for a single stored procedure, or for the last stored procedure in a batch).
The dbretstatus function actually retrieves the status number. Stored procedures that complete generally return a status number of 0.
The order in which the application processes the status number and any return parameter values is unimportant.
dbnextrow | dbrpcinit |
dbresults | dbrpcparam |
dbretdata | dbrpcsend |
dbretstatus |