Database first method with MySQL gives type conversion error.

4 posts, 0 answers
  1. Martin
    Martin avatar
    2 posts
    Member since:
    Nov 2011

    Posted 09 Nov 2011 Link to this post

    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.
  2. Ady
    Admin
    Ady avatar
    589 posts

    Posted 14 Nov 2011 Link to this post

    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!

  3. DevCraft banner
  4. Martin
    Martin avatar
    2 posts
    Member since:
    Nov 2011

    Posted 14 Nov 2011 Link to this post

    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.

  5. Ivailo
    Admin
    Ivailo avatar
    318 posts

    Posted 14 Nov 2011 Link to this post

    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!

Back to Top