dbhasretstat

Determines whether a stored procedure or a remote stored procedure generated a return status number.

Syntax

DBBOOL dbhasretstat ( PDBPROCESS dbproc );

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

TRUE or FALSE.

Remarks

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.

See Also
dbnextrow dbrpcinit
dbresults dbrpcparam
dbretdata dbrpcsend
dbretstatus  

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.