dbretlen

Description

Determine the length of a return parameter value generated by a stored procedure.

Syntax

DBINT dbretlen(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

The length of the specified return parameter value. If retnum is out of range, dbretlen returns -1. If the return value is null, dbretlen returns 0.

Usage

See also

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