Skip to Content.
Sympa Menu

freetds - Re: [freetds] dblib and bind variables

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] dblib and bind variables
  • Date: Thu, 21 Jul 2005 00:34:28 -0400

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




Archive powered by MHonArc 2.6.24.

Top of Page