Problem in inserting 100KB string into oracle db
Hi All,
I am facing problem in inserting a 100KB string in to a oracle. Data type of the column in oracle is long(Can hold values up to 2GB).
sTOC is the variable holding 100KB string. This is working perfectly fine with small strings. But when tried to insert long strings giving error in Line4 as
" Error occured with sqlcode -6502 and sqlerrm ORA-06502: PL/SQL: numeric or value error: character string buffer too small".
Any pointers will be very helpful.
Thanks,
MSUser
================================================== ==================
Oracle Code:
================================================== ==================
1)Declare
2)sToc long;
3)Begin
4)sToc := '10KB String';
5)INSERT INTO LIVE.PRODUCT_table_of_contents (ID,TOC) VALUES (10,sToc );
6)Exception
7)when others then
8)dbms_output.put_line ( ' Error occured with sqlcode ' || sqlcode || ' and sqlerrm ' || sqlerrm );
9)End;
================================================== ==================
End of Oracle Code:
================================================== ==================
|