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

RLinq error. Int16 to SQL smallint

3 Answers 84 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.
Robert
Top achievements
Rank 1
Robert asked on 29 Oct 2012, 10:16 AM

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

3 Answers, 1 is accepted

Sort by
0
PetarP
Telerik team
answered on 01 Nov 2012, 03:49 PM
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.
0
Robert
Top achievements
Rank 1
answered on 02 Nov 2012, 08:17 AM

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

0
PetarP
Telerik team
answered on 05 Nov 2012, 01:23 PM
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.
Tags
Databases and Data Types
Asked by
Robert
Top achievements
Rank 1
Answers by
PetarP
Telerik team
Robert
Top achievements
Rank 1
Share this question
or