This is a migrated thread and some comments may be shown as answers.

MySQLDatetime to Timestamp conversion

3 Answers 90 Views
Databases and Data Types
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alexander
Top achievements
Rank 1
Alexander asked on 06 Sep 2010, 03:26 PM
Hello, 

when i query my MySQL Database i get following exception: 

Error reading field MagicService.Mt_businesshour._bUHTIMEFROM from ResultSet: Telerik.OpenAccess.RT.sql.SQLException: conversion from MySql.Data.Types.MySqlDateTime to Timestamp not supported.
   bei Telerik.OpenAccess.RT.Adonet2Generic.Impl.ResultSetImp.getTimestamp(Int32 columnIndex)
   bei OpenAccessRuntime.Relational.sql.conv.DateTimestampConverter.getValue(ResultSet rs, Int32 index, RelationalColumn col)
   bei OpenAccessRuntime.Relational.RelationalGenericState.getFieldData(ResultSetParams& para)
   bei OpenAccessRuntime.Relational.RelationalGenericState.copyPass1Fields(ResultSet rs, FetchGroupField[] fetchGroups, Int32 firstCol) Telerik.OpenAccess.RT.sql.SQLException: conversion from MySql.Data.Types.MySqlDateTime to Timestamp not supported.
   bei Telerik.OpenAccess.RT.Adonet2Generic.Impl.ResultSetImp.getTimestamp(Int32 columnIndex)
   bei OpenAccessRuntime.Relational.sql.conv.DateTimestampConverter.getValue(ResultSet rs, Int32 index, RelationalColumn col)
   bei OpenAccessRuntime.Relational.RelationalGenericState.getFieldData(ResultSetParams& para)
   bei OpenAccessRuntime.Relational.RelationalGenericState.copyPass1Fields(ResultSet rs, FetchGroupField[] fetchGroups, Int32 firstCol)

The Type of the Field BUH_TIME_FROM is MySQLDatetime. Do you have any suggestions? 

Regards,
Alexander Voigt

P.S.: 
I'm using Visual Studio 2010, LinQ with Telerik OpenAccess ORM and MySQL Server 5.1.50-community with MySQL Connector for .Net v. 6.2.4

3 Answers, 1 is accepted

Sort by
0
Alexander
Top achievements
Rank 1
answered on 07 Sep 2010, 11:07 AM
As I've tested now, with MySQL 5.0.90 it is working.
0
Ady
Telerik team
answered on 07 Sep 2010, 02:21 PM
Hello Alexander,

 I did test a simple case with a timstamp column on the 5.1.31 version and everything works as expected. Can you send me a sample application where I can reproduce the error or maybe your reversemapping.config file (if you have reverse mapped the tables)?

Best wishes,
Ady
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Alexander
Top achievements
Rank 1
answered on 07 Sep 2010, 03:30 PM
After changing various things (like switching the schema from MyISAM to InnoDB, updating the connector to v6.3.4, and so on) 
I am also unable to reproduce the exception.
But thanks anyway :) 
Tags
Databases and Data Types
Asked by
Alexander
Top achievements
Rank 1
Answers by
Alexander
Top achievements
Rank 1
Ady
Telerik team
Share this question
or