dbretdata

Description

Return a pointer to a return parameter value generated by a stored procedure.

Syntax

BYTE *dbretdata(dbproc, retnum)
 
DBPROCESS   *dbproc;
int                       retnum;

Parameters

dbproc

A pointer to the DBPROCESS structure that provides the connection for a particular front-end/server process. It contains all the information that DB-Library uses to manage communications and data between the front end and server.

retnum

The number of the return parameter value of interest. The first return value is 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 specified in the remote procedure call.) When specifying retnum, non-return parameters do not count. 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 specified return value. If retnum is out of range, dbretdata returns NULL. To determine whether the data really has a null value (and retnum is not merely out of range), check for a return of 0 from dbretlen.

Usage

See also

dbnextrow, dbnumrets, dbresults, dbretlen, dbretname, dbrettype, dbrpcinit, dbrpcparam