[freetds] ct_param differences between 0.62 and 0.63
Iain Calder
iain.calder at blueyonder.co.uk
Sun Jul 24 19:37:05 EDT 2005
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
More information about the FreeTDS
mailing list