dbclropt

Description

Clear an option set by dbsetopt.

Syntax

RETCODE dbclropt(dbproc, option, param)
 
DBPROCESS    *dbproc;
int                      option;
char*                  param;

Parameters

dbproc

A pointer to the DBPROCESS structure that provides the connection for a particular front end/server process. It contains all the information that DB-Library uses to manage communications and data between the front end and 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 Options for a 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. Options 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 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.

If an invalid parameter is specified for one of the server options, this will be discovered the next time a command buffer is sent to the 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.

Returns

SUCCEED or FAIL.

Usage

See also

dbisopt, dbsetopt, Options