DB2 - Problembeschreibung
| Problem IT10998 | Status: Geschlossen | 
| UPDATING INFORMIX COLUMNS WITH TYPE DATETIME HOURS TO SECONDS FAILS VIA ENTITY FRAMEWORK: UNKNOWN PRIMITIVETYPEKIND TIME | |
| Produkt: | |
| DB2 FOR LUW / DB2FORLUW / A50 - DB2 | |
| Problembeschreibung: | |
| 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-Zusammenfassung: | |
| **************************************************************** * USERS AFFECTED: * * All Platform * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 LUW v10.5 Fixpack 7 or later. * **************************************************************** | |
| Local-Fix: | |
| Lösung | |
| First Fixed in DB2 LUW v10.5 Fixpack 7. | |
| Workaround | |
| keiner bekannt / siehe Local-Fix | |
| Weitere Daten | |
| Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 01.09.2015 08.10.2015 08.10.2015 | 
| Problem behoben ab folgender Versionen (IBM BugInfos) | |
| Problem behoben lt. FixList in der Version | |
| 10.5.0.7 |  | 







 
