Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ () — Sybase DB Library C 4.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

  1                       Version 4.0 -- 5/1/89             dbhasretstat
  ______________________________________________________________________

  NAME:  dbhasretstat

  FUNCTION:
       Determine whether the current command or  remote  procedure  call
       generated a return status number.

  SYNTAX:
       DBBOOL dbhasretstat(dbproc)

       DBPROCESS *dbproc;

  COMMENTS:







  dbhasretstat            Version 4.0 -- 5/1/89                        2
  ______________________________________________________________________

       o This routine determines whether the current  Transact-SQL  com-
         mand or remote procedure call generated a return status number.
         Status numbers are returned by all stored procedures running on
         a  SQL Server  whose  version  is  4.0  or above.  Since status
         numbers are a feature of stored procedures, only a remote  pro-
         cedure call or an EXECUTE command can generate a status number.
       o The dbretstatus() routine  actually  gets  the  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 When executing a  stored  procedure,  the  server  returns  the
         status  number  immediately  after returning all other results.
         Therefore, the application can call dbhasretstat()  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             dbhasretstat
  ______________________________________________________________________
         each SELECT it  contains.   Before  the  application  can  call
         dbhasretstat()  or  dbretstatus(), 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:



  dbhasretstat            Version 4.0 -- 5/1/89                        4
  ______________________________________________________________________
       TRUE or FALSE.

  SEE ALSO:
       dbnextrow,   dbresults,   dbretdata,   dbretstatus,    dbrpcinit,
       dbrpcparam, dbrpcsend














Typewritten Software • bear@typewritten.org • Edmonds, WA 98026