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 IT10998 Status: Closed

UPDATING INFORMIX COLUMNS WITH TYPE DATETIME HOURS TO SECONDS FAILS VIA
ENTITY FRAMEWORK: UNKNOWN PRIMITIVETYPEKIND TIME

product:
DB2 FOR LUW / DB2FORLUW / A50 - DB2
Problem description:
You have written a .NET Entity Framework program that makes use 
of the DB2 Data Server Driver to connect with an Informix IDS 
instance. 
 
The program EF model has an association with a table with the 
following schema: 
 
create table test_time_hs 
  ( 
    id serial not null , 
    name char(50), 
    creation_time datetime hour to second, 
    primary key (id) 
  ); 
 
The program retrieves one row of data from the table 
test_time_hs  (C# code , "db" being the name of the EF model ): 
 
    test_time_hs myData; 
    myData = db.test_time_hs.FirstOrDefault<test_time_hs>(); 
 
updates the value for the field "creation_time", which in the 
program will appears as having .NET type "Time" : 
 
    myData.creation_time = new TimeSpan(DateTime.Now.Ticks); 
 
and then pushes back the updates to the database calling 
 
         db.SaveChanges(); 
 
This action will raise an exception. where the last nested 
exception has the description 
 
     Unknown PrimitiveTypeKind Time 
 
and the top of the stack is: 
 
IBM.Data.DB2.Entity.MetadataHelpers.GetDbType 
IBM.Data.DB2.Entity.DmlSqlGenerator.ExpressionTranslator.CreateP 
arameter 
IBM.Data.DB2.Entity.DmlSqlGenerator.ExpressionTranslator.Visit 
System.Data.Common.CommandTrees.DbConstantExpression.Accept 
(...)
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* All Platform                                                 * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 LUW v10.5 Fixpack 7 or later.                 * 
****************************************************************
Local Fix:
Solution
First Fixed in DB2 LUW v10.5 Fixpack 7.
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
01.09.2015
08.10.2015
08.10.2015
Problem solved at the following versions (IBM BugInfos)
Problem solved according to the fixlist(s) of the following version(s)
10.5.0.7 FixList