Page 1 of 1

Problem writing type time with Version 6.50.237.0

Posted: Mon 31 Oct 2011 08:02
by denkhe
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)
Devart.Common.Entity.az.a(z A_0, DbCommand A_1)
Devart.Common.Entity.x.a(z A_0, DbCommandBase A_1)
Devart.Common.Entity.x.c()
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'
EDML:

Code: Select all

        
          
            
          
          
          
          
          
          
          
          
          
          
        
C#:

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
            };
            _Datenbank.SchreibeJobNeu(jobZyklisch);
The exception occurs on trying to save the record above. The field StartUhrzeit seems to be the problem. However with Version 6.30.165.0 there was no problem!

Environment:

.Net 3.5
Visual Studio 2010
Devart.Data 5.0.336.0
Devart.Data.MySQL 6.50.237.0
MySQL 5.5

Posted: Tue 01 Nov 2011 15:54
by Shalex
Thank you for your report. We will investigate the issue and notify you about the results.

Posted: Wed 02 Nov 2011 14:23
by Shalex
The bug with the TimeSpan parameters is fixed. We will post here when the corresponding build of dotConnect for MySQL is available for download.

Posted: Fri 11 Nov 2011 16:28
by Shalex
New build of dotConnect for MySQL 6.50.244 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/mysql/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=22546 .