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                  dbisopt
  ______________________________________________________________________

  NAME:  dbisopt

  FUNCTION:
       Check the status of a SQL Server or DB-Library option.

  SYNTAX:
       DBBOOL dbisopt(dbproc, option, param)

       DBPROCESS *dbproc;
       int       option;
       char      *param;








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

  COMMENTS:

       o This routine checks the status  of  SQL Server  and  DB-Library
         options.   Although  SQL Server  options may be set and cleared
         directly  through  SQL,  the  application  should  instead  use
         dbsetopt()  and dbclropt() to set and clear options.  This pro-
         vides a uniform  interface  for  setting  both  SQL Server  and
         DB-Library  options.  It also allows the application to use the
         dbisopt() function to check the status of an option.
       o For a list of each option  and  its  default  status,  see  the
         manual page for options.

  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



  3                       Version 4.0 -- 5/1/89                  dbisopt
  ______________________________________________________________________
           communications and data between the front end and SQL Server.
           Unlike the functions dbsetopt() and dbclropt(), dbproc cannot
           be NULL here.
       option -  The option to be checked.  See the options manual  page
           for the list of options.
       param -  Certain options take parameters.  The  DBOFFSET  option,
           for example, takes as a parameter the SQL construct for which
           offsets are to be returned.  The options  manual  page  lists
           those  options  that  take parameters.  If an option does not
           take a parameter, param must be NULL.

           If the option you are checking takes a  parameter  but  there
           can be only one instance of the option, dbisopt() ignores the
           param argument.  For example, dbisopt() ignores the value  of
           param  when checking the DBBUFFER option, because row buffer-
           ing can have only one setting at a time.  On the other  hand,
           the  DBOFFSET  option  can have several settings, each with a



  dbisopt                 Version 4.0 -- 5/1/89                        4
  ______________________________________________________________________
           different parameter.  It may have been set twice-to look  for
           offsets to SELECT statements and offsets to ORDER BY clauses.
           In that case, dbisopt() needs the param argument to determine
           whether  to  check  the SELECT offset or the ORDER BY offset.
           The only other option for which dbisopt() requires a param is
           DBSTAT.

  RETURNS:
       TRUE or FALSE.

  SEE ALSO:
       dbclropt, dbsetopt, options







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