Skip to Content.
Sympa Menu

freetds - Re: coding advice, please...

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Steve Langasek <vorlon AT netexpress.net>
  • To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
  • Subject: Re: coding advice, please...
  • Date: Tue, 24 Sep 2002 09:01:50 -0500

On Tue, Sep 24, 2002 at 09:51:46AM -0400, Bill Thompson wrote:
> Thought I would consult you before doing anything that you may disapprove
> of...

> basically I need to modify tds_process_row_tokens() such that information
> about any "compute" rows is passed back to any calling function.
> In my particular case, I am trying to amend dbnextrow() to cater for these
> rows. dbnextrow() needs in turn to return either:

> REG_ROW (a normal data row has been returned)
> NO_MORE_ROWS (there ain't no more data...)
> FAIL
> BUF_FULL
> a "compute id" (to tie back this compute data to its "result" information)

> as dbnextrow() is a thinnish wrapper around tds_process_row_tokens(), the
> latter needs to pass similar information back to the former.

> As I see it I could either:

> keep the existing returns from tds_process_row_tokens() (SUCCEED or FAIL
> essentially), and add extra output parameters for returning extra
> information.

> or:

> amend the return codes from tds_process_row_tokens() to roughly match the
> dbnextrow() returns.

I don't see much point in adding an additional output parameter just to
provide a more detailed error code. Out of the above return codes, which
ones would be considered "successes", and which are "failures"?

Steve Langasek
postmodern programmer

Attachment: pgpVeM6jPEFlu.pgp
Description: PGP signature




Archive powered by MHonArc 2.6.24.

Top of Page