"ORA-12704: character set mismatch"

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
cew3
Posts: 20
Joined: Wed 15 Jul 2009 14:50

"ORA-12704: character set mismatch"

Post by cew3 » Wed 30 Jun 2010 16:32

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
Last edited by cew3 on Thu 01 Jul 2010 10:19, edited 1 time in total.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 01 Jul 2010 12:33

Thank you for the report, I have reproduced the issue.
I will let you know about the results of our investiigation.

taher.elhossin@gmail.com
Posts: 13
Joined: Sun 15 Aug 2010 11:08

Post by taher.elhossin@gmail.com » Tue 31 Aug 2010 23:36

is there are any work around to solve this problem

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 02 Sep 2010 08:02

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.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Mon 13 Dec 2010 18:08

We have found a solution for the problem.
The fix will be available in the nearest build.

Post Reply