Skip to Content.
Sympa Menu

freetds - Re: [freetds] ct_param differences between 0.62 and 0.63

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] ct_param differences between 0.62 and 0.63
  • Date: Mon, 25 Jul 2005 09:32:36 +0100

Hi Iain,

Your diagnosis is correct.
This functionality did regress somewhere between 0.62 and 0.63,
as a result of improvements to the "query with ? placeholders" logic for
both ODBC and ct-library (ct_dynamic)

I have fixed and improved this now.
A patch will be on its way to freetds this week.

Bill

-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of Iain Calder
Sent: 25 July 2005 00:37
To: TDS Development Group
Subject: [freetds] ct_param differences between 0.62 and 0.63


Apologies if this has been covered before but I've not been following
the list closely recently. I am trying to move to version 0.63 from
0.62-4 but having problems with named parameters in CS_LANG_CMD
queries. The queries all work fine using 0.62.

Database server: SQL Server 2000 with tds version = 7.0
Example query:'select @myparam'

Using ct_param to supply a string (char) value for @myparam, the query
runs successfully with 0.62-4 but using 0.63 the server reports an error

'Must declare the variable @myparam' and the query fails. The unit test

ctlib/unittests/lang_ct_param.c also produces a similar error.

Stepping through the code the changed behaviour seems to be a result of
changes made in tds/query.c to the
tds_build_params_definition(...) function. In particular the call to
tds_count_placeholders_ucs2le(...) returns a count of zero and hence an
empty parameter definition string is returned.

It looks as though 0.63 does not support '@param' style named parameters

(for tds version 7 at least). Can anyone confirm this?

Iain
_______________________________________________
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