Skip to Content.
Sympa Menu

freetds - [freetds] ct_param differences between 0.62 and 0.63

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Iain Calder <iain.calder AT blueyonder.co.uk>
  • To: TDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] ct_param differences between 0.62 and 0.63
  • Date: Mon, 25 Jul 2005 00:37:05 +0100

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




Archive powered by MHonArc 2.6.24.

Top of Page