I can only guess you have an old version of DBD::ODBC - what version have you got? This self contained example works for me:
use strict; use warnings; use DBI; use Data::Dumper; my $h = DBI->connect("dbi:ODBC:xxx","xxx","xxx", {RaiseError => 1, Pri +ntError => 0}); eval { $h->do(q/drop table mje/); }; $h->do(q/create table mje (a int)/); $h->do(q/insert into mje values(1)/); my $s = $h->prepare(q/select * from mje where a = ?/); eval { $s->execute('fred'); }; if ($@) { print "$@"; print Dumper($s->{ParamValues}); } # outputs # DBD::ODBC::st execute failed: [unixODBC][Easysoft][SQL Server Driver + #11.0][SQL Server]Invalid character value for cast specification (SQ +L-22018) #at paramvalues.pl line 17. #$VAR1 = { # '1' => 'fred' # };
In reply to Re^11: SQL query using elements from array
by mje
in thread SQL query using elements from array
by AllPaoTeam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |