dbretname

Determines the name of a return parameter of a stored procedure or a remote stored procedure.

Syntax

LPCSTR dbretname (
PDBPROCESS
dbproc,
INT
retnum );

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.
retnum
Is the number of the return value of interest. The first return value is number 1. Values are returned in the same order as the parameters were originally specified in the stored procedure’s CREATE PROCEDURE statement. (Note that this is not necessarily the same order as that specified in the remote stored procedure.) When specifying retnum, nonreturn parameters are not counted. For example, if the second parameter in a stored procedure is the only return parameter, its retnum is 1, not 2.
Returns

A pointer to the null-terminated parameter name for the specified return-parameter value. If retnum is out of range, dbretname returns NULL.

Remarks

For more information about stored procedure return parameters, see dbretdata.

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 dbretname 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).

See Also
dbnextrow dbrettype
dbnumrets dbrpcinit
dbresults dbrpcparam
dbretdata  

  


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