home *** CD-ROM | disk | FTP | other *** search
- .Na "dbretstatus"
- .mc |
- .Aa
- .Fu
- Determine the stored procedure status number returned by the
- current command or remote procedure call.
- .Ih "stored procedure, status number returned by"
- .Ih "return status, stored procedure"
- .Ih "status value, stored procedure"
- .Sy
- .Sf "DBINT dbretstatus(dbproc)"
- .Sp "DBPROCESS" "*dbproc"
- .Co
- .Bl
- \f2dbretstatus()\f1 fetches a stored procedure's status number.
- All stored procedures that are run on a \*S version 4.0 or above
- return a status number.
- Stored procedures that complete normally return a status number of 0.
- For a list of return status numbers, see the \f2Commands Reference\f1.
- .Bl
- The \f2dbhasretstat()\f1 routine
- determines whether the current \*N command or
- remote procedure call actually generated a return status number.
- Since status numbers are a feature of stored procedures,
- only a remote procedure call or an EXECUTE command can generate a status number.
- .Bl
- When executing a stored procedure,
- the server returns the status number immediately after returning all other results.
- Therefore, the application can call \f2dbretstatus()\f1 only after
- processing the stored procedure's results by calling
- \f2dbresults()\f1, as well as \f2dbnextrow()\f1 if appropriate.
- (Note that a stored procedure can generate several sets of results\(emone for each SELECT
- it contains.
- Before the application can call \f2dbretstatus()\f1 or \f2dbhasretstat()\f1, it
- must call \f2dbresults()\f1 and \f2dbnextrow()\f1 as many times as necessary
- to process all the results.)
- .Bl
- The order in which the application processes the status number and any return
- parameter values is unimportant.
- .Bl
- For an example of this routine,
- see Example 8 in the \f2\*L Reference Supplement\f1.
- .Bz
- .Pa
- .Pi dbproc
- A pointer to the DBPROCESS structure that provides the connection
- for a particular front-end/\*S process. It contains all the
- information that \*L uses to manage communications and data between the
- front end and \*S.
- .in -.375i
- .Re
- .br
- The return status number for the current command.
- .Sa
- dbhasretstat,
- dbnextrow,
- dbresults,
- dbretdata,
- dbrpcinit,
- dbrpcparam,
- dbrpcsend
- .mc
-