Problem writing type time with Version

Problem writing type time with Version

Postby denkhe » Mon 31 Oct 2011 08:02

I get the following exception when I try to write to the following record to the database:

Error Message:

Code: Select all
Initialization method Phenobyte.AMSchedulerTest.TestScheduler.SetUp threw exception. System.Data.UpdateException: System.Data.UpdateException: Fehler beim Aktualisieren der Einträge. Weitere Informationen finden Sie in der internen Ausnahme. ---> System.Data.EntityCommandCompilationException: Fehler bei der Vorbereitung der Befehlsdefinition. Weitere Informationen finden Sie in der internen Ausnahme. ---> System.InvalidOperationException: Unexpected type usage: PrimitiveTypeKind 'Time', DatabaseSpecificType: '0'..

Error Stack Trace:

Code: Select all
Devart.Common.Entity.ah.c(DbParameterBase A_0, a7 A_1)
Devart.Common.Entity.ah.d(DbParameterBase A_0, a7 A_1)
Devart.Common.Entity.ah.b(DbParameterBase A_0, a7 A_1)
Devart.Common.Entity.ah.a(ab A_0)
Devart.Common.Entity.a7.a(ab A_0)
Devart.Data.CommandTrees.ab.a(bc A_0) A_0, DbCommand A_1)
Devart.Common.Entity.x.a(z A_0, DbCommandBase A_1)
Devart.Data.MySql.Entity.MySqlEntityProviderServices.a(s A_0, DbCommandTree A_1)
Devart.Data.MySql.Entity.MySqlEntityProviderServices.CreateDbCommandDefinition(DbProviderManifest providerManifest, DbCommandTree commandTree)
System.Data.Common.DbProviderServices.CreateCommandDefinition(DbCommandTree commandTree)
System.Data.Common.DbProviderServices.CreateCommand(DbCommandTree commandTree)
System.Data.Mapping.Update.Internal.UpdateTranslator.CreateCommand(DbModificationCommandTree commandTree)
System.Data.Mapping.Update.Internal.UpdateTranslator.CreateCommand(DbModificationCommandTree commandTree)
System.Data.Mapping.Update.Internal.DynamicUpdateCommand.CreateCommand(UpdateTranslator translator, Dictionary`2 identifierValues)
System.Data.Mapping.Update.Internal.DynamicUpdateCommand.Execute(UpdateTranslator translator, EntityConnection connection, Dictionary`2 identifierValues, List`1 generatedValues)
System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter)
System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter)
System.Data.EntityClient.EntityAdapter.Update(IEntityStateManager entityCache)
System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options)
Phenobyte.AMSchedulerTest.TestScheduler.ErzeugeTestdaten() in D:\projekte\Anlaufmanagement\src\AMSchedulerTest\TestScheduler.cs: line 177
Phenobyte.AMSchedulerTest.TestScheduler.SetUp() in D:\projekte\Anlaufmanagement\src\AMSchedulerTest\TestScheduler.cs: line 70

Database (MYSQL 5.5):

Code: Select all
'Id', 'int(11)', 'NO', 'PRI', NULL, 'auto_increment'
'Job_Typ', 'int(11)', 'NO', '', NULL, ''
'Timer_Typ', 'int(11)', 'NO', '', NULL, ''
'Start_Datum', 'date', 'YES', '', NULL, ''
'Start_Uhrzeit', 'time', 'NO', '', NULL, ''
'Letzter_Start', 'datetime', 'YES', '', NULL, ''
'Letztes_Ende', 'datetime', 'YES', '', NULL, ''
'Daten', 'varchar(4000)', 'YES', '', NULL, ''
'Timestamp', 'timestamp', 'NO', '', 'CURRENT_TIMESTAMP', 'on update CURRENT_TIMESTAMP'


Code: Select all



Code: Select all
            Jobs jobZyklisch = new Jobs
                JobTyp = (int)DaGlobal.JobTyp.ExcelImportPgv,
                TimerTyp = (int)DaGlobal.TimerTyp.Zyklisch,
                StartDatum = DateTime.Now,
                StartUhrzeit = new TimeSpan(03, 44, 55),
                Timestamp = DateTime.Now

The exception occurs on trying to save the record above. The field StartUhrzeit seems to be the problem. However with Version there was no problem!


.Net 3.5
Visual Studio 2010
Devart.Data 5.0.336.0
MySQL 5.5
Posts: 14
Joined: Mon 03 Jan 2011 15:33

Postby Shalex » Tue 01 Nov 2011 15:54

Thank you for your report. We will investigate the issue and notify you about the results.
Devart Team
Posts: 7293
Joined: Thu 14 Aug 2008 12:44

Postby Shalex » Wed 02 Nov 2011 14:23

The bug with the TimeSpan parameters is fixed. We will post here when the corresponding build of dotConnect for MySQL is available for download.
Devart Team
Posts: 7293
Joined: Thu 14 Aug 2008 12:44

Postby Shalex » Fri 11 Nov 2011 16:28

New build of dotConnect for MySQL 6.50.244 is available for download now!
It can be downloaded from (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to .
Devart Team
Posts: 7293
Joined: Thu 14 Aug 2008 12:44

Return to dotConnect for MySQL