Hello,

I found what seems to be a bug (or at least a change in behavior I don't
understand) affecting DBI 1.30 (I haven't checked a later version).

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();

exit;

*****************************************************************
Steve Roels, Ph.D.                       
Scientist II - Computational Biology     Phone: (617) 761-6820
Millennium Pharmaceuticals, Inc.         FAX:   (617) 577-3555
640 Memorial Drive                       Email: [EMAIL PROTECTED]
Cambridge, MA 02139-4815
*****************************************************************

Reply via email to