data exception: string data, right truncation

  • Shatarra

    Shatarra - 2010-06-28

    insert of byte to BINARY column works but when update, below error occurs

    Caused by: org.hsqldb.HsqlException: data exception: string data, right truncation
    at org.hsqldb.error.Error.error(Unknown Source)
    at org.hsqldb.error.Error.error(Unknown Source)
    at org.hsqldb.types.BinaryType.castOrConvertToType(Unknown Source)
    at org.hsqldb.types.BinaryType.convertToType(Unknown Source)
    at org.hsqldb.StatementDML.getUpdatedData(Unknown Source)

  • Fred Toussi

    Fred Toussi - 2010-06-28

    Is the length of the byte used for update within the bounds?

    Please use the SCRIPT command to see the table defintion, which has BINARY(N) and N is the maximum length.

    Also, do not use BINARY, use VARBINARY. BINARY adds zero byte padding to your byte


Log in to post a comment.