On Thu, Feb 27, 2003 at 04:01:40PM -0500, Roels, Steven wrote:
>
> Tim,
>
> Did the following get fixed in 1.33? I didn't see it in the release
> notes, but its such a minor thing I wouldn't really expect to have seen
> it there.
It's a DBD::Oracle issue, not DBI.
Tim.
> >> Specifically, I had accidentally given bind_param an array reference
> >> rather than a scalar. I would expect (and this was the case with an
> >> earlier version of the DBI), to get an exception. Instead, although DBI
> >> seems to still consider it a mistake (you get the warning message about
> >> "Can't bind array reference..."), bind_param itself "succeeds" (returns
> >> true with raiseerror off, or does not throw an exception with raiseerror
> >> on).
> >>
> >> Thanks in advance,
> >>
> >> -Steve
> >>
> >> #!/usr/bin/perl -W
> >>
> >> use strict;
> >>
> >> use DBI;
> >>
> >> my $dbh = DBI->connect( "dbi:Oracle:#####","######","########",
> >> {AutoCommit => 0,RaiseError => 1,PrintError => 0,LongReadLen =>
> >> 5000000,LongTruncOk => 0});
> >>
> >> my $sql = "SELECT blah blah blah where mykey = ?";
> >>
> >> my $sth = $dbh->prepare($sql);
> >>
> >> $sth->bind_param(1,[1,2,3,4]);
> >>
> >> print "possible err: ",$sth->errstr(),"\n";
> >>
> >> print "I guess bind param went OK...\n";
> >>
> >> $sth->execute();
> >>
> >> $sth->finish();
> >>
> >> $dbh->disconnect();