ORA-01401: Inserted value too large for column

nqaiser used Ask the Experts™

I'm having some problems while saving data into Oracle database. I have posted the same question in the Oracle section too. I'm posting it here to get the Perl's experts' comments that if we can reslove this problem uisng Perl itself. Here is my question:

I'm getting error message "ORA-01401: Inserted value too large for column". In fact, the length of data which I'm trying to insert into table, is less than the column's width. Since the input is coming from a web page (from a Textarea field), it consists of multiple lines and thus has some carriage returns in it. I guess that's what is causing problem.

I'm using Perl and connecting to Oracle 8 using Microsoft ODBC Driver for Oracle.

Any suggestion/help will be highly appreciated.

Thanks in advance,

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Without some code to examine, I have to ask a few additional questions to understand how you've assessed the problem to be these TEXTAREA fields:

Does this only happen when the TEXTAREA is full or nearly full? Does the datasize of the column correspond exactly to the size allowed for the TEXTAREA? Is it possible the data from the TEXTAREA is slopping over the expected size because some of the data is uri-encoded?
Hi imcq,

Thanks for your comments, yes the problem was coming only when the textarea was almost full. I have managed to resolve the problem. In fact, in this particular program, I wasn't checking the size of the text entered in the textarea before trying to save that into the table. When the error was reported to me by the user, I just copied that text and counted it in the 'MS Word', where it reported as less than the size allowed. After some testing, I figured out that each carriage return actually takes 2 characters.


Good for you. It's always reassuring to find out that the error message is a good clue to discovering what the problem is.

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:


Please leave any comments here within the next seven days.


EE Cleanup Volunteer

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial