Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-03113 error Please HELP!!
Here is the erro message
DBD::Oracle::st execute failed: ORA-03113: end-of-file on communication channel
(DBD: oexec error) at C:/progs/dika/insert_blob_test.pl line 35.
Execute error: 3113 .... ORA-03113: end-of-file on communication channel (DBD: o
exec error)
instead, if i make as simple INSERT or SELECT everything is ok.
What is wrong with blobs?
Here is my code
#!/usr/local/bin/perl
use DBI;
$doDebug = 0;
$| = 1; # set stdout to flush
$LONG_RAW_TYPE=24; # Oracle type id for blobs
$dbh = DBI->connect()
or die "Connecting : $DBI::errstr\n "; open(BLOB, "file.doc");
$bytes = 0;
binmode(BLOB);
$bytes = read(BLOB, $buf, 500000);
print STDERR "Read $bytes bytes...\n"; close(BLOB);
$stmt = $dbh->prepare("INSERT INTO hr.documents (documentid ,
document_name, document) VALUES (hr.autoinc.nextval,'john.doc',?)") || die "\nPrepare error:
$DBI::err .... $DBI::errstr\n";
# Bind variable. Note that long raw (blob) values must have # their attrib explicitly specified
$attrib{'ora_type'} = $LONG_RAW_TYPE;
$stmt->bind_param(1, $buf, \%attrib);
$stmt->execute() || die "\nExecute error: $DBI::err ....
$DBI::errstr\n";
print STDERR "Complete.\n"; ---------------------------------------------------------------------
-- Posted via http://dbforums.comReceived on Sun Aug 31 2003 - 06:17:02 CDT
![]() |
![]() |