TypeNulls and ORA-12704: character set mismatch

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
hro
Posts: 5
Joined: Fri 29 Mar 2013 16:35

TypeNulls and ORA-12704: character set mismatch

Post by hro » Fri 09 Jan 2015 14:59

Hello, I recently migrated my application to the 8.4.171 version and I get the following error when running a Linq query "ORA-12704: character set mismatch".

If I check the history of updates, it indicates that this problem has been fixed with Version 7.9.333! ...

Another subsidiary question: Where did the Data.Oracle.Entity.OracleEntityProviderServices.TypedNulls property?

Thank you for your answer

Hervé

Below the generated SQL :

The VALCOLVALUE column is of type NVARCHAR2.
The TO_CHAR(NULL) expression is the problem.

Opened connection at 09/01/2015 10:13:06 +01:00
SELECT
"UnionAll1".METADATAID AS C1,
"UnionAll1".METADATAID1 AS C2,
"UnionAll1".SENDERID AS C3,
"UnionAll1".SENDERID1 AS C4,
"UnionAll1".ENTITYTYPE AS C5,
"UnionAll1".METADATAID2 AS C6,
"UnionAll1".ISAUTOFEED AS C7,
"UnionAll1".PROPERTYNAME AS C8,
"UnionAll1".SENDERID2 AS C9,
"UnionAll1".METADATAID3 AS C10,
"UnionAll1".NAME AS C11,
"UnionAll1".DESCRIPTION AS C12,
"UnionAll1".DATATYPE AS C13,
"UnionAll1".C1 AS C14,
"UnionAll1".VALIDX AS C15,
"UnionAll1".VALCOLVALUE AS C16,
"UnionAll1".SENDERID3 AS C17,
"UnionAll1".METADATAID4 AS C18,
"UnionAll1".ENTITYTYPE1 AS C19,
"UnionAll1".C2 AS C20,
"UnionAll1".C3 AS C21,
"UnionAll1".C4 AS C22,
"UnionAll1".C5 AS C23,
"UnionAll1".C6 AS C24,
"UnionAll1".C7 AS C25,
"UnionAll1".C8 AS C26,
"UnionAll1".C9 AS C27
FROM (SELECT
CASE WHEN "Extent4".VALIDX IS NULL THEN TO_NUMBER(NULL) ELSE 1 END AS C1,
"Filter2".METADATAID1 AS METADATAID,
"Filter2".METADATAID2 AS METADATAID1,
"Filter2".SENDERID,
"Filter2".SENDERID AS SENDERID1,
"Filter2".ENTITYTYPE,
"Filter2".METADATAID1 AS METADATAID2,
"Filter2".ISAUTOFEED,
"Filter2".PROPERTYNAME,
"Filter2".SENDERID AS SENDERID2,
"Filter2".METADATAID2 AS METADATAID3,
"Filter2".NAME,
"Filter2".DESCRIPTION,
"Filter2".DATATYPE,
"Extent4".VALIDX,
"Extent4".VALCOLVALUE,
"Extent4".SENDERID AS SENDERID3,
"Extent4".METADATAID AS METADATAID4,
"Extent4".ENTITYTYPE AS ENTITYTYPE1,
TO_CHAR(NULL) AS C2,
TO_NUMBER(NULL) AS C3,
TO_NUMBER(NULL) AS C4,
TO_NUMBER(NULL) AS C5,
TO_NUMBER(NULL) AS C6,
TO_NUMBER(NULL) AS C7,
TO_NUMBER(NULL) AS C8,
TO_NUMBER(NULL) AS C9
FROM (SELECT
"Extent1".SENDERID,
"Extent1".METADATAID AS METADATAID1,
"Extent1".ENTITYTYPE,
"Extent1".PROPERTYNAME,
"Extent1".ISAUTOFEED,
"Extent2".METADATAID AS METADATAID2,
"Extent2".NAME,
"Extent2".DESCRIPTION,
"Extent2".DATATYPE
FROM PMCOLMAPPING "Extent1"
INNER JOIN PMMETADATA "Extent2" ON "Extent1".METADATAID = "Extent2".METADATAID
WHERE (("Extent1".ISAUTOFEED = 1) AND ("Extent2".DATATYPE = 1)) AND ( EXISTS (SELECT
1 AS C1
FROM PMMETADATAVIEW "Extent3"
WHERE ("Extent1".METADATAID = "Extent3".METADATAID) AND ("Extent3".ISFILTERABLE = 1)
)) ) "Filter2"
LEFT OUTER JOIN PMCOLVALUELIST "Extent4" ON (("Filter2".ENTITYTYPE = "Extent4".ENTITYTYPE) AND ("Filter2".SENDERID = "Extent4".SENDERID)) AND ("Filter2".METADATAID1 = "Extent4".METADATAID)
WHERE "Filter2".ENTITYTYPE = :p__linq__0
UNION ALL
SELECT
2 AS C1,
"Filter5".METADATAID3 AS METADATAID,
"Filter5".METADATAID4 AS METADATAID1,
"Filter5".SENDERID,
"Filter5".SENDERID AS SENDERID1,
"Filter5".ENTITYTYPE,
"Filter5".METADATAID3 AS METADATAID2,
"Filter5".ISAUTOFEED,
"Filter5".PROPERTYNAME,
"Filter5".SENDERID AS SENDERID2,
"Filter5".METADATAID4 AS METADATAID3,
"Filter5".NAME,
"Filter5".DESCRIPTION,
"Filter5".DATATYPE,
TO_NUMBER(NULL) AS C2,
TO_CHAR(NULL) AS C3 ,
TO_NUMBER(NULL) AS C4,
TO_NUMBER(NULL) AS C5,
TO_NUMBER(NULL) AS C6,
"Extent8".URL,
"Extent8".METADATAID AS METADATAID4,
"Extent8".SENDERID AS SENDERID3,
"Extent8".ISDISPLAYEDBYDEFAULT,
"Extent8".DISPLAYORDER,
"Extent8".FILTERORDER,
"Extent8".ISFILTERABLE,
"Extent8".ENTITYTYPE AS ENTITYTYPE1
FROM (SELECT
"Extent5".SENDERID,
"Extent5".METADATAID AS METADATAID3,
"Extent5".ENTITYTYPE,
"Extent5".PROPERTYNAME,
"Extent5".ISAUTOFEED,
"Extent6".METADATAID AS METADATAID4,
"Extent6".NAME,
"Extent6".DESCRIPTION,
"Extent6".DATATYPE
FROM PMCOLMAPPING "Extent5"
INNER JOIN PMMETADATA "Extent6" ON "Extent5".METADATAID = "Extent6".METADATAID
WHERE (("Extent5".ISAUTOFEED = 1) AND ("Extent6".DATATYPE = 1)) AND ( EXISTS (SELECT
1 AS C1
FROM PMMETADATAVIEW "Extent7"
WHERE ("Extent5".METADATAID = "Extent7".METADATAID) AND ("Extent7".ISFILTERABLE = 1)
)) ) "Filter5"
INNER JOIN PMMETADATAVIEW "Extent8" ON ("Filter5".METADATAID3 = "Filter5".METADATAID4) AND ("Extent8".METADATAID = "Filter5".METADATAID4)
WHERE "Filter5".ENTITYTYPE = :p__linq__0) "UnionAll1"
ORDER BY "UnionAll1".METADATAID ASC, "UnionAll1".METADATAID1 ASC, "UnionAll1".SENDERID1 ASC, "UnionAll1".ENTITYTYPE ASC, "UnionAll1".METADATAID3 ASC, "UnionAll1".C1 ASC
-- p__linq__0: '1' (Type = Int32, IsNullable = false)
-- Executing at 09/01/2015 10:13:07 +01:00
-- Failed in 204 ms with error: ORA-12704: non-concordance de jeux de caractères

Shalex
Site Admin
Posts: 8248
Joined: Thu 14 Aug 2008 12:44

Re: TypeNulls and ORA-12704: character set mismatch

Post by Shalex » Mon 12 Jan 2015 09:16

hro wrote:Where did the Data.Oracle.Entity.OracleEntityProviderServices.TypedNulls property?
The OracleEntityProviderServices.TypedNulls property was deprecated in the previous versions.
It is not available in the current version of dotConnect for Oracle.
hro wrote:I get the following error when running a Linq query "ORA-12704: character set mismatch".
Please refer to
http://forums.devart.com/viewtopic.php?t=23267
http://forums.devart.com/viewtopic.php?t=27486

If this doesn't help, send us a small complete test project with the corresponding DDL/DML script of database objects to reproduce the issue in our environment.

hro
Posts: 5
Joined: Fri 29 Mar 2013 16:35

Re: TypeNulls and ORA-12704: character set mismatch

Post by hro » Tue 13 Jan 2015 15:26

Hi,

Actually I solved my problem; The error came from edmx ssdl file with a mismatch data type VARCHAR2 instead of NVARCHAR2.

Thank you for the reply and sorry for the inconvenience

Best Regards

Post Reply