Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Inserting more than 4000 characters into BLOB field

Inserting more than 4000 characters into BLOB field

From: Raphael Silva <raphael.silva_at_gmail.com>
Date: Tue, 6 Jun 2006 10:39:53 -0300
Message-ID: <faf909c50606060639q39c299c4x47f425fb5e7a5b2f@mail.gmail.com>


In order to insert more than 4000 characters into the BLOB field, I created 2 procedures:

CREATE OR REPLACE package body lob_pkg
as

g_blob blob;

procedure lob_ins( nm_file in varchar2, nr_seq in number, p_text in raw) as
begin

     insert into TB_FRAG values (nm_file, nr_seq, empty_blob() ) returning PCCF_BL_FRAG into g_blob;

     dbms_lob.write( g_blob,utl_raw.length(p_text), 1,p_text); end;

procedure add_more( p_text in raw )
as
begin

    dbms_lob.writeappend( g_blob, utl_raw.length(p_text), p_text ); end;

end;

So, in my program, first i make the call to the first procedure (lob_ins) and than from 4000 to 4000 characters i call recursively the second one, till all the characters have been appended to the blob.

The problem is that i'm getting the max open cursor error. I tried to set a higher number of cursors but it was no use. I want to know if there is some other way to insert stuff into the Blob field, or if there is something wrong with my procedures.

Thanks,
Raphael

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Jun 06 2006 - 08:39:53 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US