On Thu, Jun 20, 2002 at 12:08:42PM -0400, Ronald J Kimball wrote: > On Thu, Jun 20, 2002 at 04:36:10PM +0100, David Totten wrote: > > > $main::sth = $main::dbh->prepare("insert into $tablename (idnum, > > xml) values (mysequence.nextval, ?)"); > > $main::sth->bind_param(2, $foo, $clob); > > You're trying to bind to the second placeholder, but your statement only > contains one placeholder.
Alright, I modified it so that I was passing in 2 parameters: sub insertRecord { my $foo = shift; my $clob = { ora_type => ORA_CLOB, ora_field => "xml" }; my $number = { ora_type => ORA_NUMBER, orafield => "idnum" }; $main::dbh->{LongReadLen} = 2**20; $main::dbh->{LongTruncOk} = 0; $main::sth = $main::dbh->prepare("insert into $tablename (idnum, xml) values (?, ?)"); $main::sth->bind_param(1, 1, $number); $main::sth->bind_param(2, $foo, $clob); if (!$main::sth->execute) { print "Error message was: $main::dbh->errstr\n"; } $main::sth->finish(); return ""; } Now I am getting: Can't bind :p1, ora_type 2 not supported by DBD::Oracle at load.pl line 118. Dave Totten