home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IC89906 Status: Closed

CAST() IN QUERY USED IN .NET FRAMEWORK DOES NOT ADEQUATELY RESOLVE
PRECISION OF DATETIME DATATYPE IN IDS DATABASE.

product:
DB2 FOR LUW / DB2FORLUW / A10 - DB2
Problem description:
When using 'CAST() as' clause in a query, .NET Framework is 
unable to accurate gauge the precision of the DateTIme data 
type. Instead, 
it uses the maximum precision for the data type (Year to 
fraction(5)). This becomes a problem when the cast is part of 
SELECT ... UNION... 
statement, and the precision of the cast does not match the 
precision of a column type. In that scenario, the following 
error results: 
 
<m:internalexception><m:message>ERROR [IX000] [IBM][IDS/UNIX64] 
 
Corresponding column types must be compatible for each UNION 
statement.     <---------------- 
</m:message><m:type>IBM.Data.DB2. DB2Exception</m:type><m:stack 
 
trace> at IBM.Data.DB2.DB2Command.ExecuteReaderObject(Command 
Behavior 
behavior, String method, DB2CursorType reqCursorType, Boolean 
 
abortOnOptValueChg, Boolean skipDeleted, Boolean isResultSet, 
Int32 
maxRows, Boolean skipInitialValidation) at 
 
IBM.Data.DB2.DB2Command.ExecuteReaderObject(Comman dBehavior 
behavior, 
String method) at 
IBM.Data.DB2.DB2Command.ExecuteReader(CommandBehavi or 
behavior) at IBM.Data.DB2.DB2Command.ExecuteDbDataReader(Command 
Behavior 
behavior) at 
 
System.Data.EntityClient.EntityCommandDefinition.E 
xecuteStoreCommands(En 
tityCommand entityCommand, CommandBehavior 
 
behavior)</m:stacktrace></m:internalexception> 
 
Operating system and level 
  Windows 
 
Client, server, and gateway information 
 Client connects to server, no gateway involved. 
 
Server information, if applicable 
  Will get an update defect. 
 
 
How to reproduce the problem 
 Yunming Wang reports reproducing the problem with the test case 
from defect wsdbu00956011.
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* .Net users                                                   * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* upgrade to db2 client v10fp3                                 * 
****************************************************************
Local Fix:
Either restructure the query so a UNION is not used, which makes 
the problem moot, or modify DateTime columns to maximum 
precision of Year to Fraction(5) so the problem is not visible.
available fix packs:
DB2 Version 10.1 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 6 for Linux, UNIX, and Windows

Solution
upgrade to db2 client v10fp3
Workaround
not known / see Local fix
BUG-Tracking
forerunner  : APAR is sysrouted TO one or more of the following: IC97005 
follow-up : 
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
29.01.2013
24.10.2013
24.10.2013
Problem solved at the following versions (IBM BugInfos)
Problem solved according to the fixlist(s) of the following version(s)
10.1.0.3 FixList
10.1.0.3 FixList