home *** CD-ROM | disk | FTP | other *** search
- .Na "dbclropt"
- .Aa
- .Fu
- Clear an option set by \f2dbsetopt()\f1.
- .Ih "option, clearing an"
- .Sy
- .Sf "RETCODE dbclropt(dbproc, option, param)"
- .Sp "DBPROCESS" "*dbproc"
- .Sp "int" "option"
- .Sp "char" "*param"
- .Co
- .Bl
- This routine clears \*S and
- \*L options that have been set with
- .I "dbsetopt()."
- Although \*S options may be set and cleared directly through
- SQL, the application should instead use
- .I "dbsetopt()"
- and
- .I "dbclropt()"
- to set and clear options. This provides a uniform interface for
- setting both \*S and \*L options.
- It also allows the application to use the
- .I "dbisopt()"
- function to check the status of an option.
- .Bl
- \f2dbclropt()\f1 does not immediately clear the option.
- The option is cleared the next time a command buffer is sent
- to the \*S (by invoking \f2dbsqlexec()\f1 or \f2dbsqlsend()\f1).
- .Bl
- For a complete list of options,
- see the manual page for
- .I options.
- .Bz
- .Pa
- .Pi dbproc
- A pointer to the DBPROCESS structure that provides the connection
- for a particular front end/\*S process. It contains all the
- information that \*L uses to manage communications and data between the
- front end and \*S.
- If
- .I dbproc
- is NULL, the option will be cleared for all active DBPROCESS structures.
- .Pi option
- The option that is to be turned off.
- See the \f2options\f1 manual page for the list of options.
- .Pi 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 \f2options\f1 manual page lists those options that take parameters.
- If an option does not take a parameter,
- .I param
- must be NULL.
- .sp 0.5v
- If the option you are clearing takes a parameter but there can be only
- one instance of the option, \f2dbclropt()\f1 ignores the
- .I param
- argument.
- For example,
- \f2dbclropt()\f1 ignores the value of
- .I 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\(emto look for offsets to
- SELECT statements and offsets to ORDER BY
- clauses.
- In that case, \f2dbclropt()\f1 needs the \f2param\f1 argument to determine whether
- to clear the SELECT offset or the ORDER BY offset.
- The only other option for which \f2dbclropt()\f1 requires a \f2param\f1 is DBSTAT.
- .sp 0.5v
- If an invalid parameter is specified for one of the \*S options,
- this will be discovered the next time a command buffer is sent to the \*S.
- The \f2dbsqlexec()\f1 or \f2dbsqlsend()\f1 call will fail, and \*L will invoke the user-installed
- message handler.
- If an invalid parameter is specified for one of the \*L options (DBBUFFER or DBTEXTLIMIT),
- the \f2dbclropt()\f1 call itself will fail.
- .in -.375i
- .Re
- .br
- SUCCEED or FAIL.
- .Sa
- dbisopt,
- dbsetopt,
- options
-