home *** CD-ROM | disk | FTP | other *** search
-
- 1 Version 4.0 -- 5/1/89 dbretstatus
- ______________________________________________________________________
-
- NAME: dbretstatus
-
- FUNCTION:
- Determine the stored procedure status number returned by the
- current command or remote procedure call.
-
- SYNTAX:
- DBINT dbretstatus(dbproc)
-
- DBPROCESS *dbproc;
-
- COMMENTS:
-
-
-
-
-
-
-
- dbretstatus Version 4.0 -- 5/1/89 2
- ______________________________________________________________________
-
- o dbretstatus() fetches a stored procedure's status number. All
- stored procedures that are run on a SQL Server 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 Commands Reference.
- o The dbhasretstat() routine determines whether the current
- Transact-SQL command or remote procedure call actually gen-
- erated 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.
-
- o When executing a stored procedure, the server returns the
- status number immediately after returning all other results.
- Therefore, the application can call dbretstatus() only after
- processing the stored procedure's results by calling
- dbresults(), as well as dbnextrow() if appropriate. (Note that
- a stored procedure can generate several sets of results-one for
-
-
- 3 Version 4.0 -- 5/1/89 dbretstatus
- ______________________________________________________________________
- each SELECT it contains. Before the application can call
- dbretstatus() or dbhasretstat(), it must call dbresults() and
- dbnextrow() as many times as necessary to process all the
- results.)
-
- o The order in which the application processes the status number
- and any return parameter values is unimportant.
- o For an example of this routine, see Example 8 in the DB-Library
- Reference Supplement.
-
- PARAMETERS:
- dbproc - A pointer to the DBPROCESS structure that provides the
- connection for a particular front-end/SQL Server process. It
- contains all the information that DB-Library uses to manage
- communications and data between the front end and SQL Server.
-
- RETURNS:
-
-
-
- dbretstatus Version 4.0 -- 5/1/89 4
- ______________________________________________________________________
- The return status number for the current command.
-
- SEE ALSO:
- dbhasretstat, dbnextrow, dbresults, dbretdata, dbrpcinit,
- dbrpcparam, dbrpcsend
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-