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

  1. .Na "dbclrbuf" 
  2. .Aa
  3. .Fu
  4. Drop rows from the row buffer.
  5. .Ih "row buffer, clearing"
  6. .Sy
  7. .Sf "void dbclrbuf(dbproc, n)"
  8. .Sp "DBPROCESS" "*dbproc"
  9. .Sp "DBINT" "n"
  10. .Co
  11. .Bl
  12. \*L provides a row-buffering service to application programs.
  13. You can turn row buffering on by calling
  14. \f2dbsetopt(dbproc, DBBUFFER, "n")\f1
  15. where
  16. .I n
  17. is the number of rows you would like \*L to buffer.
  18. If buffering is on, you can then randomly
  19. refer to rows that have been read from
  20. \*S, using
  21. .I "dbgetrow()."
  22. See the \f2dbgetrow()\f1 manual page for a discussion of the benefits and penalties
  23. of row buffering.
  24. .Bl
  25. The row buffer can become full for two reasons.  Either \*S
  26. has returned more than the
  27. .I n
  28. rows you said you wanted buffered,
  29. or
  30. sufficient space couldn't be allocated to save the row you wanted.
  31. When the row buffer is full,
  32. .I "dbnextrow()"
  33. returns BUF_FULL and refuses to read in the next row from \*S.
  34. Once the row buffer is full, subsequent calls to
  35. .I "dbnextrow()"
  36. will continue to return BUF_FULL until at least one row is freed by calling
  37. .I "dbclrbuf()."
  38. \f2dbclrbuf()\f1 always frees the oldest rows in the
  39. buffer first.
  40. .Bl
  41. Once a result row has been cleared from the buffer, it is no longer
  42. available to the program.
  43. .Bl
  44. For an example of row buffering, see
  45. Example 4 in the \f2\*L Reference Supplement\f1.
  46. .Bz
  47. .Pa
  48. .Pi dbproc
  49. A pointer to the DBPROCESS structure that provides the connection
  50. for a particular front end/\*S process.  It contains all the
  51. information that \*L uses to manage communications and data between the
  52. front end and \*S.
  53. .Pi n
  54. The number of rows you want cleared from the row buffer.
  55. If you 
  56. make
  57. .I n
  58. equal to or greater 
  59. than the number of rows in the buffer, all but the newest row will
  60. be removed.
  61. If 
  62. .I n
  63. is less than 1, the function call is ignored.
  64. .in -.375i
  65. .Re
  66. .br
  67. None.
  68. .Sa
  69. dbgetrow,
  70. dbnextrow,
  71. dbsetopt,
  72. options
  73.