Page 1 of 1

"ORA-12704: character set mismatch"

Posted: Wed 30 Jun 2010 16:32
by cew3
Hi there,

I get the error "ORA-12704: character set mismatch" caused by the following query:

Code: Select all

var query = from M3 in pDB.EntityFramework.DeviceData
                   where M3.ID == id
                   join G2 in pDB.EntityFramework.DeviceSorts on M3.DeviceID equals G2.ID
                   select new {
                                      ID = M3.ID ?? "ABC",
                                      Text1 = G2.Name ?? "XYZ"};
this results in

Code: Select all

SELECT 
     1 AS C1, 
     "Extent1".ID AS ID, 
     CASE WHEN ("Extent2"."Name" IS NULL) THEN 'XYZ' ELSE "Extent2"."Name" END AS C2
FROM  "DeviceData" "Extent1"
     INNER JOIN "DeviceSorts" "Extent2" ON "Extent1"."DeviceID" = "Extent2".ID
WHERE "Extent1".ID = :p__linq__0
The ORA error raises because the results in THEN and ELSE case must be of the same type.

The column "Extent2"."Name" used in the examples is of datatype nvarchar(64).

'XYZ' should be N'XYZ' to work

The dataprovider should look at the datatypes of both results and select the most common type if possible.

This problem occures in version 5.70.140.0.

Best regards,
cew3

Posted: Thu 01 Jul 2010 12:33
by AndreyR
Thank you for the report, I have reproduced the issue.
I will let you know about the results of our investiigation.

Posted: Tue 31 Aug 2010 23:36
is there are any work around to solve this problem

Posted: Thu 02 Sep 2010 08:02
by AndreyR
Unfortunately, there is no solution in EF v1.
We are investigating the possibility to find a workaround in EF v4, but no timeframe is available.

Posted: Mon 13 Dec 2010 18:08
by AndreyR
We have found a solution for the problem.
The fix will be available in the nearest build.