DB2 - Problem description
Problem IC91173 | 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 / 970 - 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 v9.7 Fixpack 9 * **************************************************************** | |
Local Fix: | |
available fix packs: | |
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows | |
Solution | |
First fixed in DB2 v9.7 Fixpack 9 | |
Workaround | |
not known / see Local fix | |
BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC95333 IC96270 follow-up : | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 28.03.2013 17.12.2013 17.12.2013 |
Problem solved at the following versions (IBM BugInfos) | |
9.7.FP9 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.9 | |
9.7.0.9 |