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

Database first method with MySQL gives type conversion error.

3 Answers 52 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.
Martin
Top achievements
Rank 1
Martin asked on 09 Nov 2011, 12:00 PM
Hi there,

I have just downloaded the latest trial version of OpenAccess (2011.2.713.3) to try out on a new project. It looks really nice and I would like to use it. Howvever I will have to get it working first. I have reverse engineered a MySQL 5.5 database. Everything worked fine. When I try to get a list of records I get the following error:

The metadata for field '_medewerker' of class 'Ign.IgnAdmin.Domain.Medewerkerproject' cannot be initialized: Type converter initialization failed. The converter with name 'DecimalConverter' does not convert from CLR type 'System.String' to SQL type 'decimal'.
Parameter name: converterName
Actual value was OpenAccessRuntime.Data.DecimalConverter, Telerik.OpenAccess.Runtime, Version=2011.2.713.3, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342.

I tried fiddling with the types in the generated diagram but that is probably not the way to go because when you change something to the database you want to be able to regenerate your diagram and your classes.

Any help would be appreciated.

Martin.

3 Answers, 1 is accepted

Sort by
0
Ady
Telerik team
answered on 14 Nov 2011, 10:05 AM
Hi Martin,

 Did you modify the default mapped CLR type of the property from 'Decimal' to 'String'? This error indicates that the decimal column is mapped to a 'string' CLR type.

Regards,
Ady
the Telerik team

NEW and UPDATED OpenAccess ORM Resources. Check them out!

0
Martin
Top achievements
Rank 1
answered on 14 Nov 2011, 10:38 AM
Hi Ady,

No I did not modify anything. But I no longer have the problem because I am now using LLBLGEN. So thanks for you support but this issue can be closed.

Very best regards,
Martin van der Linden.

0
Ivailo
Telerik team
answered on 14 Nov 2011, 11:05 AM
Hello Martin,

Thank you for your interest in OpenAccess ORM. 

Do not hesitate to contact us if you decide to give it another try and we can be of any assistance.

Regards,
Ivailo
the Telerik team

NEW and UPDATED OpenAccess ORM Resources. Check them out!

Tags
Databases and Data Types
Asked by
Martin
Top achievements
Rank 1
Answers by
Ady
Telerik team
Martin
Top achievements
Rank 1
Ivailo
Telerik team
Share this question
or