[freetds] Buffering problem

James K. Lowden jklowden at freetds.org
Mon Jul 10 07:43:17 EDT 2006

ZIGLIO, Frediano, VF-IT wrote:
> BUF_FULL is returned if buffering is turned on and reading the next row
> would cause the buffer to be exceeded. In this case, no row will have
> been read. To read any more rows, at least one row must first be pruned
> from the top of the row buffer by calling dbclrbuf.
> so BUF_FULL is not returned if buffer is already full but only if buffer
> will be full

How does FreeTDS differ from Microsoft's behavior?  

As I read the specification, "would ... be exceeded" means "is full".  If
the buffer holds 3 rows, dbnextrow() returns BUF_FULL when trying to read
the 4th row.  

To me, dbnextrow() is correct: it checks to see if there is room in the
buffer.  If not, it returns BUF_FULL without reading a row.  

(I'm hoping to fix dbnextrow() and dbresults() today to remove



More information about the FreeTDS mailing list