home *** CD-ROM | disk | FTP | other *** search
-
- 1 Version 4.0 -- 5/1/89 dbclropt
- ______________________________________________________________________
-
- NAME: dbclropt
-
- FUNCTION:
- Clear an option set by dbsetopt().
-
- SYNTAX:
- RETCODE dbclropt(dbproc, option, param)
-
- DBPROCESS *dbproc;
- int option;
- char *param;
-
-
-
-
-
-
-
-
- dbclropt Version 4.0 -- 5/1/89 2
- ______________________________________________________________________
-
- COMMENTS:
-
- o This routine clears SQL Server and DB-Library options that have
- been set with dbsetopt(). 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 provides 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 dbclropt() does not immediately clear the option. The option
- is cleared the next time a command buffer is sent to the
- SQL Server (by invoking dbsqlexec() or dbsqlsend()).
-
- o For a complete list of options, see the manual page for
- options.
-
-
-
-
- 3 Version 4.0 -- 5/1/89 dbclropt
- ______________________________________________________________________
-
- 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.
- If dbproc is NULL, the option will be cleared for all active
- DBPROCESS structures.
- option - The option that is to be turned off. 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 clearing takes a parameter but there
- can be only one instance of the option, dbclropt() ignores
-
-
- dbclropt Version 4.0 -- 5/1/89 4
- ______________________________________________________________________
- the param argument. For example, dbclropt() ignores the
- value of param when clearing the DBBUFFER option, because row
- buffering can have only one setting at a time. On the other
- hand, the DBOFFSET option can have several settings, each
- with a different parameter. It may have been set twice-to
- look for offsets to SELECT statements and offsets to ORDER BY
- clauses. In that case, dbclropt() needs the param argument
- to determine whether to clear the SELECT offset or the ORDER
- BY offset. The only other option for which dbclropt()
- requires a param is DBSTAT.
-
- If an invalid parameter is specified for one of the
- SQL Server options, this will be discovered the next time a
- command buffer is sent to the SQL Server. The dbsqlexec() or
- dbsqlsend() call will fail, and DB-Library will invoke the
- user-installed message handler. If an invalid parameter is
- specified for one of the DB-Library options (DBBUFFER or
- DBTEXTLIMIT), the dbclropt() call itself will fail.
-
-
- 5 Version 4.0 -- 5/1/89 dbclropt
- ______________________________________________________________________
-
- RETURNS:
- SUCCEED or FAIL.
-
- SEE ALSO:
- dbisopt, dbsetopt, options
-
-
-
-
-
-
-
-
-
-
-
-
-
-