ORA-01482: unsupported character set

ORA-01482: unsupported character set

Postby ma_devart » Tue 31 Jan 2012 20:16

For Code-First Development with Entity Framework 4.2, I get this following error while saving data.

ORA-01482: unsupported character set
ORA-06512: at line 4

I guess this is something doing with the datatype. Is there a way to specify specific datatype such as varchar(32) at the entity level.

Thanks,
ma_devart
 
Posts: 2
Joined: Tue 31 Jan 2012 20:00

Postby Shalex » Wed 01 Feb 2012 15:00

Please send us a small test project so that we can reproduce the problem in our environment. Also specify the exact (x.xx.xxx) version of your dotConnect for Oracle.
Shalex
Devart Team
 
Posts: 7781
Joined: Thu 14 Aug 2008 12:44

Data Type Specification for Database Generation

Postby ma_devart » Wed 01 Feb 2012 18:07

I think the question we are asking is how for database generation do you specify that a string is a CHAR(32) or NVARCHAR(20) or VARCHAR(4) when using Code First?

Can this be done via DataAnnotation attributes or the fluent API? If so how?

We use the current version (6.60.283).
ma_devart
 
Posts: 2
Joined: Tue 31 Jan 2012 20:00

Postby Shalex » Mon 06 Feb 2012 18:06

By default, strings in EF Code-First are considered as unicode and without explicit length. That's why they are of NCLOB type. They would be VARCHAR2 if the [not unicode string] and [length < 4000 symbols] settings were specified in fluent (or attribute) mapping for a particular property.

Solution for the attribute mapping. If you indeed have the type in your database which differs from NCLOB, specify this explicitly. E.g.: set the MaxLength(123) attribute if you have the VARCHAR2(123) column in your database. Also turn off PropertyMaxLengthConvention from the Conventions collection in DbModelBuilder (this convention is used for unicode strings).

Solution for the fluent mapping. Set HasMaxLength(123) and IsUnicode(false) for the corresponding property. In this case there is no need to turn off PropertyMaxLengthConvention.
Shalex
Devart Team
 
Posts: 7781
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle