home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer) / NeXT_Developer-3.3.iso / NextLibrary / Documentation / Sybase / DBLIB / Section2 / dbclropt.nr < prev    next >
Encoding:
Text File  |  1993-04-22  |  2.7 KB  |  89 lines

  1. .Na "dbclropt" 
  2. .Aa
  3. .Fu
  4. Clear an option set by \f2dbsetopt()\f1.
  5. .Ih "option, clearing an"
  6. .Sy
  7. .Sf "RETCODE dbclropt(dbproc, option, param)"
  8. .Sp "DBPROCESS" "*dbproc"
  9. .Sp "int" "option"
  10. .Sp "char" "*param"
  11. .Co
  12. .Bl
  13. This routine clears \*S and 
  14. \*L options that have been set with
  15. .I "dbsetopt()."
  16. Although \*S options may be set and cleared directly through
  17. SQL, the application should instead use
  18. .I "dbsetopt()"
  19. and
  20. .I "dbclropt()"
  21. to set and clear options.  This provides a uniform interface for
  22. setting both \*S and \*L options.
  23. It also allows the application to use the
  24. .I "dbisopt()"
  25. function to check the status of an option.
  26. .Bl
  27. \f2dbclropt()\f1 does not immediately clear the option.
  28. The option is cleared the next time a command buffer is sent
  29. to the \*S (by invoking \f2dbsqlexec()\f1 or \f2dbsqlsend()\f1).
  30. .Bl
  31. For a complete list of options, 
  32. see the manual page for
  33. .I options.
  34. .Bz
  35. .Pa
  36. .Pi dbproc
  37. A pointer to the DBPROCESS structure that provides the connection
  38. for a particular front end/\*S process.  It contains all the
  39. information that \*L uses to manage communications and data between the
  40. front end and \*S.
  41. If
  42. .I dbproc
  43. is NULL, the option will be cleared for all active DBPROCESS structures.
  44. .Pi option
  45. The option that is to be turned off.
  46. See the \f2options\f1 manual page for the list of options.
  47. .Pi param
  48. Certain options take parameters.  The
  49. DBOFFSET
  50. option, for example, takes as a parameter the SQL construct for which offsets are to
  51. be returned.
  52. The \f2options\f1 manual page lists those options that take parameters.
  53. If an option does not take a parameter, 
  54. .I param
  55. must be NULL.
  56. .sp 0.5v
  57. If the option you are clearing takes a parameter but there can be only
  58. one instance of the option, \f2dbclropt()\f1 ignores the 
  59. .I param
  60. argument.
  61. For example, 
  62. \f2dbclropt()\f1 ignores the value of
  63. .I param
  64. when clearing the DBBUFFER option,
  65. because row buffering can have only one setting at a time.
  66. On the other hand, the DBOFFSET option can have several settings,
  67. each with a different parameter.
  68. It may have been set twice\(emto look for offsets to
  69. SELECT statements and offsets to ORDER BY 
  70. clauses.
  71. In that case, \f2dbclropt()\f1 needs the \f2param\f1 argument to determine whether
  72. to clear the SELECT offset or the ORDER BY offset.
  73. The only other option for which \f2dbclropt()\f1 requires a \f2param\f1 is DBSTAT.
  74. .sp 0.5v
  75. If an invalid parameter is specified for one of the \*S options, 
  76. this will be discovered the next time a command buffer is sent to the \*S.
  77. The \f2dbsqlexec()\f1 or \f2dbsqlsend()\f1 call will fail, and \*L will invoke the user-installed
  78. message handler.
  79. If an invalid parameter is specified for one of the \*L options (DBBUFFER or DBTEXTLIMIT),
  80. the \f2dbclropt()\f1 call itself will fail.
  81. .in -.375i
  82. .Re
  83. .br
  84. SUCCEED or FAIL.
  85. .Sa
  86. dbisopt,
  87. dbsetopt,
  88. options
  89.