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
"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(db2java.zip) are the same.
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.