RLinq error. Int16 to SQL smallint

4 posts, 0 answers
  1. Robert
    Robert avatar
    15 posts
    Member since:
    Aug 2011

    Posted 29 Oct 2012 Link to this post

    Hi,

    I tried to add a domain model for some table and I got this error when trying to compile.

    Backend is Oracle. Silverlight5, ORM 2012.3.1012.1

    It throws error on every nullable Int16 column.

    Error 6 RIA code generation failed to construct OpenAccess context: The metadata for field '_PRESENCE' of class 'ANeT.Common.Membership.Web.IPOREF' cannot be initialized: Type converter initialization failed. The converter with name 'OracleUdt2StringConverter' does not convert from CLR type 'System.Nullable`1[[System.Int16, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' to SQL type 'smallint'.
    Parameter name: converterName
    Actual value was OpenAccessRuntime.Data.OracleUdt2StringConverter, Telerik.OpenAccess.Runtime, Version=2012.3.1012.1, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342. ANeT.Common (ANeT.Common\ANeT.Common)

    Best regards

    Robert

  2. PetarP
    Admin
    PetarP avatar
    754 posts

    Posted 01 Nov 2012 Link to this post

    Hello Robert,

     That is very unusual. Can you please check if you have not set any converters on the failing columns? You can do so by locating the columns in the schema explorer and pressing f4 to check their properties. The property for Converter should not be set.

    Kind regards,
    Petar
    the Telerik team
    Telerik OpenAccess ORM Meets ASP.NET Web API. Read more.
  3. DevCraft banner
  4. Robert
    Robert avatar
    15 posts
    Member since:
    Aug 2011

    Posted 02 Nov 2012 Link to this post

    Hi Petar,

    thank you for you reply.

    Unfortunately there is no converter set on the column.

    The only solution I found is to delete table from diagram and from schema explorer. 

    Then update from database and create table again with Oracle backend.

    With Oracle backend the columns now will be created with NUMBER datatype.

    I suppose the rlinq was originally generated on MSSQL backend, so smallint datatype columns were generated.

    After changing it to Oracle backend, the converter error is being thrown, because datatype columns remained smallint.

    Robert

  5. PetarP
    Admin
    PetarP avatar
    754 posts

    Posted 05 Nov 2012 Link to this post

    Hello Robert,

     You are correct. Indeed changing the backend can cause some problems as we are yet to release our type editor that will be taking care of all those conversions automatically. 
    We are glad that you have managed to continue your work. Please do not hesitate to contact us back if you face any further difficulties. 

    Kind regards,
    Petar
    the Telerik team
    Telerik OpenAccess ORM Meets ASP.NET Web API. Read more.
Back to Top