Skip to Content.
Sympa Menu

freetds - RE: Another ODBC command..

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT ais.org>
  • To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
  • Subject: RE: Another ODBC command..
  • Date: Wed, 2 Oct 2002 09:35:28 -0400 (EDT)



I think the implementation of this shan't be too hard. It is essentially
"array binding" ala ctlib (we don't implement that either because hardly
anyone uses it in the real world). That is, given one condition that
FetchOrientation must always be SQL_FETCH_NEXT.

If you're doing other stuff then, it will require protocol support for
cursors or a client side row buffering implementation, which is not easy.

Brian

On Mon, 30 Sep 2002, James K. Lowden wrote:

> On 30 Sep 2002 17:19:06 -0600, "Ross Simpson" <mqsimpson AT aol.com> wrote:
> > Talking to the developer who wrote the application I'm trying to use
> > with FreeTDS, he said the reason he used SQLExtendedFetch was to be able
> > to get a subset of the returned recordset -- i.e., get the first 10
> > results, process them, then get the next 10, process those, etc. etc.
> >
> > My question is, are cursors necessary for this purpose? The application
> > will never ask for results out of order, or ask for a previous result --
> > it just wants to process the records in batches instead of all at once.
>
> Ross,
>
> I'm not an ODBC programmer and I don't play one on TV, so I can't give you
> specific guidance. But the answer is, no, you don't need a cursor to
> fetch rows in order.
>
> Here's a rule of thumb: Never use a cursor. Cursor's are for Lame Janes
> who think a result set is what you get when you step in wet concrete. Get
> your rows from the server as they're sent, and do with them what you will,
> but don't turn the SQL Server into a for() loop.
>
> (I realize this wasn't your design. I thought you might enjoy passing on
> passed judgement. :)
>
> I don't see anything in your description that couldn't be handled simpler
> and easier with SQLFetch. Just one man's opinion, of course. I'm sure
> there are others.
>
> Regards,
>
> --jkl
>
> ---
> You are currently subscribed to freetds as: [camber AT ais.org]
> To unsubscribe, forward this message to $subst('Email.Unsub')
>




  • RE: Another ODBC command.., James K . Lowden, 10/01/2002
    • <Possible follow-up(s)>
    • RE: Another ODBC command.., Brian Bruns, 10/02/2002

Archive powered by MHonArc 2.6.24.

Top of Page