[freetds] dblib and bind variables
James K. Lowden
jklowden at freetds.org
Thu Jul 21 00:34:28 EDT 2005
Patrick Dunnigan wrote:
> Does dblib support the use of bind variables or placeholder syntax for
> sql statements?
db-lib does not support placeholders per se; that is, it does not support
any kind of syntax that uses '?' to represent a text-substitution
location.
db-lib does have a set of functions that support calling stored
procedures: the rpc functions. If you convert your query to a stored
procedure, you can use them.
I do most of my db-lib work in C++, and find that the string-handling
features in the C++ standard library convenient for composing the SQL and
calling dbsqlexec(), easier than describing the parameter with
dbrpcparam(). But YMMV.
HTH.
--jkl
More information about the FreeTDS
mailing list