On Thu, Jun 20, 2002 at 05:59:17PM +0100, David Totten wrote:
> 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.

Does it work if you don't specify the type for the numeric argument?  It
shouldn't be necessary.

Ronald

Reply via email to