With this piece of code
foreach $gif (@files){ @gif_parts = split(/_/,$gif); print "Inserting into id=$gif_parts[0], name=$gif: ";
# Read file into scalar
open(IN, $gif ) or die $!;
binmode(IN);
my $doc_len = read IN, $doc, $max_len;
close(IN);
print qq{$doc_len bytes\n};
my $tmp=<STDIN>; #just to make it one by one...
# Insert document into the database.
# Prepare the insert statement.
#my $sth=$dbh->prepare(qq{INSERT INTO PELRER_TEST(id,name,data) VALUES (SEQ_PERLER_TEST.nextval,?,?) });
$sth=$dbh->prepare(qq{UPDATE dla15_download_content set web_sample_file1=? where id=?});
# Bind variables to columns. print "$gif_parts[0]\n"; $sth->bind_param(1, $doc, {ora_type => ORA_BLOB} ); $sth->bind_param(2, $gif_parts[0] );
# Insert/Update my $rv = $sth->execute(); } I get :
DBD::Oracle::st execute failed: (DBD ERROR: Need bind_param(..., { ora_field=>... }) attribute to identify table LOB field names) at dbi2.pl line 45, <STDIN> chunk 1.
DBD::Oracle::st execute failed: (DBD ERROR: Need bind_param(..., { ora_field=>... }) attribute to identify table LOB field names) at dbi2.pl line 45, <STDIN> chunk 1.
Issuing rollback() for database handle being DESTROY'd without explicit disconnect(), <STDIN> chunk 1.
Can anyone suggest?
Ant.
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>