Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > Oracle
|
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 30th, 2004, 02:46 AM
Registered User
 
Join Date: Mar 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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:
================================================== ==================


 
Old December 31st, 2004, 05:55 AM
Authorized User
 
Join Date: Dec 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What is the data type, lenth of the field TOC?






Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting records to Oracle db from asp page jowjow Classic ASP Basics 0 April 4th, 2006 09:24 AM
Problem with inserting data into an Access DB donrafeal ASP.NET 2.0 Basics 0 January 6th, 2006 05:34 PM
inserting into oracle using php cblake PHP Databases 1 May 26th, 2005 03:01 AM
problem in inserting blob data to oracle selphyr JSP Basics 2 December 2nd, 2004 01:44 PM
Bulk Inserting from VB to Oracle parshavgarg Pro VB Databases 0 July 29th, 2004 07:18 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.