Why not do something like this?
my $sql =<<E_SQL_E;
INSERT INTO Table
(target_id, blob1,blob2)
VALUES
(target_id_seq.nextval, ?,?)
E_SQL_E
my $sth = $dbh->prepare($sql) or confess $DBI::errstr;;
$sth->bind_param(1, $blob1, { ora_type => ORA_BLOB, ora_field=>'blob1'});
$sth->bind_param(2, $blob2, { ora_type => ORA_BLOB, ora_field=>'blob2'});
$sth->execute() or confess $DBI::errstr;
Works for me ...
-j
-------------------------------------------------
James Diggans
Bioinformatics Programmer
Gene Logic, Inc.
Phone: 301.987.1756
FAX: 301.987.1701
Christian Gruber
<Christian.Gruber@ To: [EMAIL PROTECTED]
biomax.de> cc:
Subject: Oracle BLOB problem
07/11/01 07:49 AM
Hello!
I'm using DBI 1.18, DBD::Oracle 1.07 and Perl 5.005_05. My Software is
running on Linux and I am working with Oracle 8.1.7.
Here the problem: I can't perform an insert statement that has more
than one BLOB. I use bind_param(...., {ora_type=>ORA_BLOB}) to bind
the parameters, which works fine for one single BLOB. But when the
insert statement contains 2 BLOBs, I get the following error:
DBD::Oracle::st execute failed: (DBD ERROR: Need bind_param(..., {
ora_field=>... }) attribute to identify table LOB field names)
I have included a test script that reproduces the problem on my
machine.
Does anybody have a clue?
Thanks in advance
Christian
--
*********************************
Christian Gruber (Dipl.-Biol.)
Technical Product Manager
Biomax Informatics AG
Lochhamer Str. 11
82152 Martinsried, Germany
Tel: +49 89/895574-64
Fax: +49 89/895574-25
mailto:[EMAIL PROTECTED]
http://www.biomax.de
*********************************
========================================================
The information contained in this email message is intended only
for the personal use of the recipient(s) named above. This
message may be privileged and confidential and protected from
disclosure. If the reader of this message is not the intended
recipient or an agent responsible for delivering it to the intended
recipient, you are hereby notified that you have received this
document in error and that any review,dissemination, distribution,
or copying of this message is strictly prohibited. If you have
received this communication in error, please notify us immediately
by email, and delete the original message.
========================================================