Inserting more than 4000 characters into BLOB field

  • From: "Raphael Silva" <raphael.silva@xxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Tue, 6 Jun 2006 10:39:53 -0300

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

Other related posts:

  • » Inserting more than 4000 characters into BLOB field