locked
Oracle.DataAccess.Client.OracleException ORA-12899: value too large for column (actual: 2002, maximum: 2000) RRS feed

  • Question

  • User-1183196778 posted

    Oracle.DataAccess.Client.OracleException ORA-12899: value too large for column  (actual: 2002, maximum: 2000)

    parameters[2] = new OracleParameter("DATA_BLOCK", OracleDbType.Varchar2, subs, ParameterDirection.Input);

    Getting error while passing data of size 2000 characters.

    Its throwing error

    Oracle.DataAccess.Client.OracleException ORA-12899: value too large for column  (actual: 2002, maximum: 2000).

    But characters that I am passing are 2000.

    Any help ??

    Thursday, July 28, 2011 9:58 AM

Answers

  • User269602965 posted

    alter size of the table target column to be 2048 BYTES

    sometimes data is polluted with non-printable, non-text, binary garbage, like CHR(18), CHR(150) and you might not see the extra character viewing the data or counting width with text editor (except Ultraedit in Hexidecimal mode might find the garbage).

    It is important to clean up data in the application before it is inserted. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 29, 2011 11:16 AM

All replies

  • User1224194097 posted

    Try specifying the Size for the oracle parameter to 2000. Error suggests that subs string length is 2002 characters. Check if it has additional characters. Use subs.Trim();

    Thursday, July 28, 2011 10:06 AM
  • User-1183196778 posted

    already tried trim....no success.

    characters are 2000 till executenonquery excutes........ but dont know why exception coming....

    Thursday, July 28, 2011 1:18 PM
  • User269602965 posted

    alter size of the table target column to be 2048 BYTES

    sometimes data is polluted with non-printable, non-text, binary garbage, like CHR(18), CHR(150) and you might not see the extra character viewing the data or counting width with text editor (except Ultraedit in Hexidecimal mode might find the garbage).

    It is important to clean up data in the application before it is inserted. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 29, 2011 11:16 AM