Clear an option set by dbsetopt.
RETCODE dbclropt(dbproc, option, param) DBPROCESS *dbproc; int option; char* param;
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.
The option that is to be turned off. See Options for a list of options.
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 fails, 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 fails.
SUCCEED or FAIL.
This routine clears the server and DB-Library options that have been set with dbsetopt. Although 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 server and DB-Library options. It also allows the application to use the dbisopt function to check the status of an option.
dbclropt does not immediately clear the option. The option is cleared the next time a command buffer is sent to the server (by invoking dbsqlexec or dbsqlsend).
For a complete list of options, see Options.