Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^10: SQL query using elements from array

by AllPaoTeam (Acolyte)
on Oct 15, 2014 at 15:46 UTC ( #1103923=note: print w/replies, xml ) Need Help??


in reply to Re^9: SQL query using elements from array
in thread SQL query using elements from array

Yea I ran this but got the error:
Use of uninitialized value in subroutine entry at c:/Perl64/lib/DBD/OD +BC.pm line 166.

Replies are listed 'Best First'.
Re^11: SQL query using elements from array
by mje (Curate) on Oct 16, 2014 at 08:35 UTC

    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' # };
      Yea, I dont have my laptop with me today, I will run that over the weekend and see if I have any issues. Once again thanks for all your time and effort. It would be great if I get this to work, it would save me a lot of time in the future. Will try to post what happens on monday or tuesday.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1103923]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2020-12-03 17:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (57 votes). Check out past polls.

    Notices?