Skip to Content.
Sympa Menu

freetds - RE: [freetds] [ freetds-Patches-1045430 ] cursors in ct-lib

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Thompson, Bill D (London)" <bill_d_thompson AT ml.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] [ freetds-Patches-1045430 ] cursors in ct-lib
  • Date: Fri, 15 Oct 2004 12:01:56 +0100

Freddy,

many many thanks for the application of the patch, and the subsequent
cleanup of my code.

I'll check it out on Solaris later on today if I get the chance

Bill

-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of ZIGLIO,
Frediano, VF-IT
Sent: 15 October 2004 10:43
To: FreeTDS Development Group
Subject: RE: [freetds] [ freetds-Patches-1045430 ] cursors in ct-lib


> > - TDS_CURSOR should be TDSCURSOR for coherence
> > - I don't like "mycursor" variable name. We never used "my" variable
> prefix
>
> feel free to change them...
>

Changed

>
> > - I don't understand the reason for client_cursor_id and
> cursor_id.Isn't one of them sufficient?
>
> Briefly, no. its to do with the ct_library functions and the TDS 5.0
> protocol
>
> In TDS 5.0 you can use ct_cursor() to send a "DECLARE CURSOR"
> directive,
> which will return a real (server) cursor_id, which you can then use as
> an input to a subsequent directive, e.g. "OPEN CURSOR"
>
> In TDS 7.0 there is no concept of a DECLARE CURSOR directive,
> so we have
> to give back to the calling program a "dummy" cursor_id which it can
> then use in subsequent ct_cursor() calls.

Why not using server id in TDS 5.0 and use a dummy id for TDS 7.0 ?

> > there are many place where you search for cursor using
> > client_cursor_id it would better to use a function. This code it's
> > mainly located in token.c, I think that somewhere we should set
> > current_results before token processings, use this variable
> and don't
> > care about cursor_id (Bill, the weird thing it's that you
> explain this
> > some time ago :) ).
>
> You are right, there's a lot of similar code hanging around.
> It'll take a little bit of thinking to get it elegant, though.
>

I changed the loops, mainly cause you forgot to test for cursor != NULL.
I don't like tds->client_cursor_id setting in ct.c, IMHO should be set
only inside libTDS.

> I should make the effort to understand the "dynamic" code some more.
> It seems to be
> a) involved with many things that people try to do with ODBC driver
> b) the only substantial unknown in the ct-lib code (to me anyway)
>

It supported by ctlib too, not only ODBC (although better supported and
tested in ODBC).

This morning I finished by tests with HP-UX 11. It compile and run (even
all tests ODBC included) without problems (I only removed some warnings
due to sizeof returning unsigned long int instead of unsigned int).
Does current CVS (or today snapshot) work correctly under Solaris ?

freddy77
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
--------------------------------------------------------

If you are not an intended recipient of this e-mail, please notify the
sender, delete it and do not read, act upon, print, disclose, copy, retain or
redistribute it. Click here for important additional terms relating to this
e-mail. http://www.ml.com/email_terms/
--------------------------------------------------------





Archive powered by MHonArc 2.6.24.

Top of Page