ORA-06502: PL/SQL: numeric or value error: invalid LOB locator [message #406316] |
Wed, 03 June 2009 05:11  |
 |
ramoradba
Messages: 2457 Registered: January 2009 Location: AndhraPradesh,Hyderabad,I...
|
Senior Member |
|
|
Hi can any one suggest me where i need to modify.
The same procedure works fine with one record but not the second
through some java programme the field value set to null so how can i initialize that to execute successfully
SQL> ed
Wrote file afiedt.buf
1 DECLARE
2 my_text_handle CLOB;
3 my_buffer clob;
4 my_add_amt NUMBER := 32000;
5 my_offset INTEGER := 1;
6 buf varchar2(32000);
7 BEGIN
8 select text into my_buffer from SRIRAM_CLOB;
9 buf := dbms_lob.substr(my_buffer);
10 my_add_amt := length(buf);
11 SELECT long_text
12 INTO my_text_handle
13 FROM text
14 where TEXT_SEQUENCE_NUMBER=246 and text_id= 88 FOR UPDATE;
15 DBMS_LOB.WRITE(my_text_handle, my_add_amt, my_offset, buf);
16 COMMIT;
17* END;
SQL> /
PL/SQL procedure successfully completed.
SQL> ed
Wrote file afiedt.buf
1 DECLARE
2 my_text_handle CLOB;
3 my_buffer clob;
4 my_add_amt NUMBER := 32000;
5 my_offset INTEGER := 1;
6 buf varchar2(32000);
7 BEGIN
8 select text into my_buffer from SRIRAM_CLOB;
9 buf := dbms_lob.substr(my_buffer);
10 my_add_amt := length(buf);
11 SELECT long_text
12 INTO my_text_handle
13 FROM text
14 where TEXT_SEQUENCE_NUMBER=14257 and text_id= 88 FOR UPDATE;
15 DBMS_LOB.WRITE(my_text_handle, my_add_amt, my_offset, buf);
16 COMMIT;
17* END;
SQL> /
DECLARE
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: invalid LOB locator specified:
ORA-22275
ORA-06512: at "SYS.DBMS_LOB", line 819
ORA-06512: at line 15
regards
Sriram
|
|
|
|
|
|
|
|