[freetds] Buffering problem
ZIGLIO, Frediano, VF-IT
Frediano.Ziglio at vodafone.com
Mon Jul 10 08:23:03 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
> dbproc->dbresults_state.)
>
Is strange but it seems that if you set buffer to 10 rows after getting
9 rows dbnextrow returns BUF_FULL. Obviously there is space for another
row but it returns BUF_FULL (and it doesn't seem to read the row...).
freddy77
More information about the FreeTDS
mailing list