Error in reading CLOB [message #39113] |
Mon, 17 June 2002 12:42 |
Vinod
Messages: 76 Registered: April 1999
|
Member |
|
|
Hi All,
I have written the following function to read CLOB value.
CREATE OR REPLACE funcTION GET_CABLE_message(seqnumber number) return varchar2 IS
charbuf VARCHAR2(4000);
clob_locator CLOB;
read_amount integer;
read_offset integer;
BEGIN
SELECT message INTO clob_locator FROM abacus_cable_info WHERE seq_no =seqnumber;
read_offset := 1;
read_amount := 4000;
dbms_lob.read(clob_locator, read_amount, read_offset, charbuf);
return charbuf;
EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
END;
The above function is working fine, But the problem is i can read only upto 4000 Charecters and if i want to read more than that and if i change the charbuf and read_amount to 30000 and when i execute the function i get the following error
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
Can anybody pls help me
Thanks
Vinod
|
|
|
|