home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer) / NeXT_Developer-3.3.iso / usr / sybase / doc / dbclrbuf.man < prev    next >
Encoding:
Text File  |  1993-04-22  |  2.8 KB  |  89 lines

  1.  
  2.   1                       Version 4.0 -- 5/1/89                 dbclrbuf
  3.   ______________________________________________________________________
  4.  
  5.   NAME:  dbclrbuf
  6.  
  7.   FUNCTION:
  8.        Drop rows from the row buffer.
  9.  
  10.   SYNTAX:
  11.        void dbclrbuf(dbproc, n)
  12.  
  13.        DBPROCESS *dbproc;
  14.        DBINT     n;
  15.  
  16.   COMMENTS:
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.   dbclrbuf                Version 4.0 -- 5/1/89                        2
  25.   ______________________________________________________________________
  26.  
  27.        o DB-Library provides a row-buffering service to application pro-
  28.          grams.    You   can   turn   row   buffering   on   by  calling
  29.          dbsetopt(dbproc, DBBUFFER, "n") where n is the number  of  rows
  30.          you  would  like DB-Library to buffer.  If buffering is on, you
  31.          can then randomly refer  to  rows  that  have  been  read  from
  32.          SQL Server,  using  dbgetrow().  See the dbgetrow() manual page
  33.          for a discussion of the benefits and penalties of  row  buffer-
  34.          ing.
  35.        o The row  buffer  can  become  full  for  two  reasons.   Either
  36.          SQL Server  has  returned  more  than  the  n rows you said you
  37.          wanted buffered, or sufficient space couldn't be  allocated  to
  38.          save  the  row you wanted.  When the row buffer is full, dbnex-
  39.          trow() returns BUF_FULL and refuses to read  in  the  next  row
  40.          from SQL Server.  Once the row buffer is full, subsequent calls
  41.          to dbnextrow() will continue to return BUF_FULL until at  least
  42.          one  row  is  freed  by  calling dbclrbuf().  dbclrbuf() always
  43.  
  44.  
  45.  
  46.   3                       Version 4.0 -- 5/1/89                 dbclrbuf
  47.   ______________________________________________________________________
  48.          frees the oldest rows in the buffer first.
  49.  
  50.        o Once a result row has been cleared from the buffer,  it  is  no
  51.          longer available to the program.
  52.        o For  an  example  of  row  buffering,  see  Example  4  in  the
  53.          DB-Library Reference Supplement.
  54.  
  55.   PARAMETERS:
  56.        dbproc -  A pointer to the DBPROCESS structure that provides  the
  57.            connection for a particular front end/SQL Server process.  It
  58.            contains all the information that DB-Library uses  to  manage
  59.            communications and data between the front end and SQL Server.
  60.        n -  The number of rows you want cleared from the row buffer.  If
  61.            you make n equal to or greater than the number of rows in the
  62.            buffer, all but the newest row will be removed.  If n is less
  63.            than 1, the function call is ignored.
  64.  
  65.  
  66.  
  67.  
  68.   dbclrbuf                Version 4.0 -- 5/1/89                        4
  69.   ______________________________________________________________________
  70.  
  71.   RETURNS:
  72.        None.
  73.  
  74.   SEE ALSO:
  75.        dbgetrow, dbnextrow, dbsetopt, options
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.