Results 1 to 2 of 2
  1. #1
    Join Date
    May 2003

    Unanswered: [IBM][CLI Driver] CLI0109E String data right truncation.

    I have a source code, that tries to insert a 3 character string into a 2 char column. I get the below exception:
    UNHANDLED EXCEPTION: [IBM][CLI Driver] CLI0109E String data right truncation. SQLSTATE=22001
    This seems ok to me.
    However, my partner executes the same program on his machine. During the insert statement, no exception occurs and when I look into the database, I see only the first 2 characters of the string is inserted into the db. It looks like at the code
    cs.setString(1, "CAV");
    "CAV" is truncated and then inserted as "CA".

    If anyone has any idea why there is difference, I would be very interested in learning it.

    FYI: We both are using the same platform and source code. Our JDK and db2 driver( are the same.

    Selva Kumar

  2. #2
    Join Date
    Aug 2003
    I can't tell your db2 version or fixpack level.

    Can't explain the difference, but I would also compare the two machines in regards to the contents of db2cli.ini and the db2 variables that are set (db2set -all). Depending on what is set, this may give you a clue as to why one system may respond differently than the other.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts