Skip to Content.
Sympa Menu

freetds - Re: ct_fetch() oddity

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT umcc.ais.org>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: ct_fetch() oddity
  • Date: Thu, 2 Sep 1999 19:49:59 -0400 (EDT)




On Thu, 2 Sep 1999, Mark Schaal wrote:

>
> Should the TDS_NO_MORE_ROWS case really behave this way? It seems
> like rows_read should be 0 and there shouldn't be any data to bind.
> (During debugging this appeared to me as a duplicate bind of the
> last value of each dataset.)
>
Hmmm... seems at one point tds returned a valid row of data when this
happened. I think this was changed sometime ago and is no longer valid.
Probably when DBROWS() stuff was implemented. Just be careful modifying
this kind of stuff, it's easy to introduce subtle bugs (at least for me it
was).

> CS_RETCODE ct_fetch(stuff)
> {
> switch (tds_process_row_tokens(cmd->con->tds_socket)) {
> case TDS_SUCCEED:
> if (rows_read) *rows_read = 1;
> _ct_bind_data(cmd);
> return TDS_SUCCEED;
> case TDS_NO_MORE_ROWS:
> if (rows_read) *rows_read = 1;
> _ct_bind_data(cmd);
> return CS_END_DATA;
> default:
> if (rows_read) *rows_read = 0;
> return CS_FAIL;
> }
> return CS_SUCCEED;
> }
>
>
> Mark
> --
> Mark J. Schaal Phone: (909)
> 620-7724
> TST On Ramp Fax: (909) 620-8174
> System Administrator E-Mail: mark AT tstonramp.com
>
> ---
> You are currently subscribed to freetds as: camber AT ais.org
> To unsubscribe, forward this message to $subst('Email.Unsub')
>
>




  • ct_fetch() oddity, Mark Schaal, 09/02/1999
    • <Possible follow-up(s)>
    • Re: ct_fetch() oddity, Brian Bruns, 09/02/1999

Archive powered by MHonArc 2.6.24.

Top of Page