| Errors during Insert operation in Pro*C [message #397776] |
Mon, 13 April 2009 20:16  |
oracle123 Messages: 49 Registered: March 2009 |
Member |
|
|
Hi All,
I am receiving the following error while inserting records.
"Oracle Error:ORA-12899: value too large for column "MFG_ADMIN"."GAGE_RESULTS"."COMP
whereas I am checking the length of all values before inserting and am sure that none of them are larger than column lengths.
I did some research and found this error might be due to character set.
select * from nls_database_parameters where parameter like '%CHARACTERSET';
PARAMETER VALUE
------------------------------
----------------------------------------------------------------------------------------------------
--------------------
NLS_CHARACTERSET UTF8
NLS_NCHAR_CHARACTERSET UTF8
Please let me know how can this be related to my problem or if something else is causing this error.
Thanks,
Scott.
|
|
|
| Re: Errors during Insert operation in Pro*C [message #397782 is a reply to message #397776] |
Mon, 13 April 2009 22:58   |
Michel Cadot Messages: 29000 Registered: March 2007 Location: Nanterre, France, http://... |
Senior Member |
|
|
ORA-12899: value too large for column %s (actual: %s, maximum: %s)
*Cause: An attempt was made to insert or update a column with a value
which is too wide for the width of the destination column.
The name of the column is given, along with the actual width
of the value, and the maximum allowed width of the column.
Note that widths are reported in characters if character length
semantics are in effect for the column, otherwise widths are
reported in bytes.
*Action: Examine the SQL statement for correctness. Check source
and destination column data types.
Either make the destination column wider, or use a subset
of the source column (i.e. use substring).
| Quote: | whereas I am checking the length of all values before inserting and am sure that none of them are larger than column lengths.
|
Prove your claims, I tend to trust Oracle.
Regards
Michel
|
|
|
| Re: Errors during Insert operation in Pro*C [message #398017 is a reply to message #397776] |
Tue, 14 April 2009 19:36   |
oracle123 Messages: 49 Registered: March 2009 |
Member |
|
|
Michel,
I once again did the same mistake. Declared the variable as char datatype and passing it in the insert statement. The value I was passing is less than the database column length but not the array holding it.
I declared it as VARCHAR datatype and it is now working fine.
Thanks,
Soctt.
|
|
|
|