Unanswered: DB2 V7.2.5: problem with CHAR-fields - Error 01004
System: MS Win2k SP4 ofi , ADO 2.7, dirver: IBM OLEDB
Hi, I have following problem:
If I select a CHAR-field from the OS390 and the result includes any special characters (such as ü,ä,ö,..), some characters are lost. This problem is new in the version 7.2 (version of client and server), but we have not found a bugnote about it. The version 6.1 didn't have this problem.
The CLI (command line interface from IBM/DB2 -> don't use ODBC) don't have this problem, but all ADO-based applications (i.e. Delphi)
An example with the field DATA defined as CHAR(5):
a.) value of DATA = 'ABCDE'
A 'SELECT DATA.....' retrieves 'ABCDE'
b.) value of DATA = 'ÜÜÜÜÜ'
A 'SELECT DATA.....' retrieves 'ÜÜ' (with CLI we get 'ÜÜÜÜÜ')
In the ODBC-Trace we have found following information:
A function called SqlBindCol sets the length parameter of the destination
buffer to '6' (5 byte character with NULL-dermination). The DB2 driver only
fills the buffer with 2 characters and reports following message:
DIAG [01S01] [IBM][CLI Driver] CLI0165E Error in row. SQLSTATE=01S01
DIAG [01S01] [IBM][CLI Driver] CLI0002W Data truncated. SQLSTATE=01004