Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Problem writing blobs
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;