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

  1. .Na "dbisopt" 
  2. .Aa
  3. .Fu
  4. Check the status of a \*S or \*L option.
  5. .Ih "option, checking the status of an"
  6. .Sy
  7. .Sf "DBBOOL dbisopt(dbproc, option, param)"
  8. .Sp "DBPROCESS" "*dbproc"
  9. .Sp "int" "option"
  10. .Sp "char" "*param"
  11. .Co
  12. .Bl
  13. This routine checks the status of \*S and 
  14. \*L options.
  15. Although \*S options may be set and cleared directly through
  16. SQL, the application should instead use
  17. .I "dbsetopt()"
  18. and
  19. .I "dbclropt()"
  20. to set and clear options.  This provides a uniform interface for
  21. setting both \*S and \*L options.
  22. It also allows the application to use the
  23. .I "dbisopt()"
  24. function to check the status of an option.
  25. .Bl
  26. For a list of each option and its default
  27. status, see the manual page for
  28. .I options.
  29. .Bz
  30. .Pa
  31. .Pi dbproc
  32. A pointer to the DBPROCESS structure that provides the connection
  33. for a particular front-end/\*S process.  It contains all the
  34. information that \*L uses to manage communications and data between the
  35. front end and \*S.
  36. Unlike the functions
  37. .I "dbsetopt()"
  38. and
  39. .I "dbclropt(),"
  40. \f2dbproc\f1 cannot be NULL here.
  41. .Pi option
  42. The option to be checked.
  43. See the \f2options\f1 manual page for the list of options.
  44. .Pi param
  45. Certain options take parameters.  The
  46. DBOFFSET
  47. option, for example, takes as a parameter the SQL construct for which offsets are to
  48. be returned.
  49. The \f2options\f1 manual page lists those options that take parameters.
  50. If an option does not take a parameter,
  51. .I param
  52. must be NULL.
  53. .sp
  54. If the option you are checking takes a parameter but there can be only
  55. one instance of the option, \f2dbisopt()\f1 ignores the 
  56. .I param
  57. argument.
  58. For example, 
  59. \f2dbisopt()\f1 ignores the value of
  60. .I param
  61. when checking the DBBUFFER option,
  62. because row buffering can have only one setting at a time.
  63. On the other hand, the DBOFFSET option can have several settings,
  64. each with a different parameter.
  65. It may have been set twice\(emto look for offsets to
  66. SELECT statements and offsets to ORDER BY 
  67. clauses.
  68. In that case, \f2dbisopt()\f1 needs the \f2param\f1 argument to determine whether
  69. to check the SELECT offset or the ORDER BY offset.
  70. The only other option for which \f2dbisopt()\f1 requires a \f2param\f1 is DBSTAT.
  71. .in -.375i
  72. .Re
  73. .br
  74. TRUE or FALSE.
  75. .Sa
  76. dbclropt,
  77. dbsetopt,
  78. options
  79.