DB2 - Problem description
Problem IC95333 | Status: Closed |
SQL_COLUMN_LENGTH RETURNS A LENGTH OF 16 INSTEAD OF 26 FOR TIMES TAMP COLUMNS WITH PATCH1=131072 ENABLED IN THE DB2CLI.INI FILE | |
product: | |
DB2 FOR LUW / DB2FORLUW / A50 - DB2 | |
Problem description: | |
By definition, the PATCH1=131072 does the following "This forces the driver to describe a TIMESTAMP column as an SQL_CHAR(26) column instead, when it is part of an unique index. " In DB2 v7.2 and before the value of SQL_COLUMN_LENGTH (via a call to SQLColAttributes) returned a value of 16 for timestamp columns. When PATCH1=131072 was enabled it returned a value of 26 for timestamp columns. After v7.2, the length always returns a value of 16 regardless of if PATCH1=131072 is enabled or not. This APAR will allow DB2 work like it used to in DB2 v7.2 and return a length of 26 when PATCH1=131072 is enabled. A symptom seen in applications is an error such as: [IBM][CLI Driver] CLI0111E Numeric value out of range. SQLSTATE=22003 The application may be relying on the return value of SQL_COLUMN_LENGTH for the length used for SQLBindCol(). If SQL_COLUMN_LENGTH returns a value of 16 and the column is bound using this value, it will be too small to hold the 26 character long timestamp value. When PATCH1=131072 is enabled after this APAR, SQL_COLUMN_LENGTH will return 26 and the application relying on this value for the length used for SQLBindCol() will be bound to an appropriate length to hold the 26 character long timestamp value. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 10.5 Fixpack 3 * **************************************************************** | |
Local Fix: | |
available fix packs: | |
DB2 Version 10.5 Fix Pack 3 for Linux, UNIX, and Windows | |
Solution | |
Problem Fixed In DB2 10.5 Fixpack 3 | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 27.08.2013 05.03.2014 05.03.2014 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) | |
10.5.0.3 | |
10.5.0.3 |