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

Home -> Community -> Usenet -> c.d.o.misc -> Problem writing blobs

Problem writing blobs

From: Thomas Rieffel <thomasr_at_fun.de>
Date: Wed, 17 Feb 1999 09:30:42 +0100
Message-ID: <36CA7E32.67A310FE@fun.de>


I have a problem with writing blobs. In the following PL/SQL-block i get a
 "ORA-06502: PL/SQL: numeric or value error" when calling the Funktion "dbms_lob.write".
I Think the problem ist, that empty_blob() doesn´t work correct, because if set locator_var to NULL before calling "dbms_lob.write" I got the same error. Does anybody know what´s the problem here. (If I run the same PL/SQL-block for clobs, the block works korrect.);

Thanks,

Thomas Rieffel

....

char my-buf[40];
....

   EXEC SQL EXECUTE

     declare
        locator_var blob;
        amount_var  binary_integer;
        offset_var  binary_integer;
     begin
        amount_var := 27;
        offset_var := 1;
        INSERT INTO blobtest(nr, lg) VALUES(1, empty_blob());
        commit;
        SELECT lg into locator_var FROM blobtest
                                   WHERE nr=1 for update;
        dbms_lob.write(locator_var, amount_var, offset_var, :my_buf);
     end;

   END-EXEC; Table-definition
 CREATE TABLE blobtest(nr integer, lg blob)); Received on Wed Feb 17 1999 - 02:30:42 CST

Original text of this message

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