freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Dirk Koopman <freetds AT tobit.co.uk>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: [freetds] perl DBI update with parameters
- Date: Thu, 14 Jul 2005 19:58:57 +0100
Consider this simulation of a much larger program:-
my $stm = q(update foo set a=?,b=? where c=? and d=?);
my $sth = $dbh->prepare($stm);
my @field = qw(foo bar);
my @keys = qw(jim pat);
$sth->execute(@field, @key);
Seems to be giving me errors in the execute complaining about there
being more parameters required by the $stm than where provided by the
the $sth->execute (although sometimes it is the other way around).
Looking at the debug trace, I believe I am preparing a statement as
shown and the data passed to the execute, the no of parameters add up to
the same no of '?' in the $stm.
This seems only to happen for update sql statements, insert statements
work just fine. I am using DBD::ODBC, unixodbc and freetds 0.62.4.
Any suggestions as to where to start looking?
Dirk
- [freetds] perl DBI update with parameters, Dirk Koopman, 07/14/2005
Archive powered by MHonArc 2.6.24.