ORA-12704: character set mismatch

ORA-12704: character set mismatch

Postby skoub » Wed 13 Jun 2012 19:00

hi!

i was using dotConnect for Oracle v6.50.237 with CodeFirst without any problems. Today, we have upgraded our project to v7.0.17 and now we get the error ORA-12704: character set mismatch.

I'm not sure where the problem come from but here's my research so far:

Here's the query that throw the 'character set mismatch' error:
Code: Select all
var q = from publication in this.appContext.Publications
            .Include(x => x.Transactions)
            .Include(x => x.PublicationsCommandes)
        select publication;

q.ToList();


If i test each entities one by one, everything is fine:
Code: Select all
this.appContext.Publications.ToList();
this.appContext.Transactions.ToList();
this.appContext.PublicationsCommandes.ToList();


If i remove one Include in the query, everything is fine:
Code: Select all
var q = from publication in this.appContext.Publications
            .Include(x => x.Transactions)
        select publication;

q.ToList();

// OR

var q = from publication in this.appContext.Publications
            .Include(x => x.PublicationsCommandes)
        select publication;

q.ToList();


So the problem is the 2 Includes at the same time. Here's the SQL generated by the query that throw the error:

Code: Select all
SELECT
"UnionAll1".ID_PUBLC AS C1,
"UnionAll1".ID_PUBLC1 AS C2,
"UnionAll1".CODE AS C3,
"UnionAll1".TITRE AS C4,
"UnionAll1".DESCRIPTION AS C5,
"UnionAll1".POIDS AS C6,
"UnionAll1".DATE_ACTIF AS C7,
"UnionAll1".DATE_INACTIF AS C8,
"UnionAll1".NOTE AS C9,
"UnionAll1".ID_PERD AS C10,
"UnionAll1".ID_TYPE_PUBLC AS C11,
"UnionAll1".ID_PUBLC_PARNT AS C12,
"UnionAll1".QUANTITE_PAR_BOITE AS C13,
"UnionAll1".ID_INTER AS C14,
"UnionAll1".C1 AS C15,
"UnionAll1".ID_TRANS AS C16,
"UnionAll1".DATE_TRANSACTION AS C17,
"UnionAll1".QUANTITE AS C18,
"UnionAll1".ID_TYPE_TRANS AS C19,
"UnionAll1".ID_PUBLC2 AS C20,
"UnionAll1".ID_INTER_DE AS C21,
"UnionAll1".ID_INTER_A AS C22,
"UnionAll1".NOTE1 AS C23,
"UnionAll1".ANNEE_INVENTAIRE AS C24,
"UnionAll1".QUANTITE_PREMIERE_LIVRAISON AS C25,
"UnionAll1".CODE_UTILISATEUR_MAJ AS C26,
"UnionAll1".C2 AS C27,
"UnionAll1".C3 AS C28,
"UnionAll1".C4 AS C29,
"UnionAll1".C5 AS C30,
"UnionAll1".C6 AS C31,
"UnionAll1".C7 AS C32,
"UnionAll1".C8 AS C33
FROM  (SELECT
   CASE WHEN "Extent2".ID_TRANS IS NULL THEN TO_NUMBER(NULL) ELSE 1 END AS C1,
   "Extent1".ID_PUBLC,
   "Extent1".ID_PUBLC AS ID_PUBLC1,
   "Extent1".CODE,
   "Extent1".TITRE,
   "Extent1".DESCRIPTION,
   "Extent1".POIDS,
   "Extent1".DATE_ACTIF,
   "Extent1".DATE_INACTIF,
   "Extent1".NOTE,
   "Extent1".ID_PERD,
   "Extent1".ID_TYPE_PUBLC,
   "Extent1".ID_PUBLC_PARNT,
   "Extent1".QUANTITE_PAR_BOITE,
   "Extent1".ID_INTER,
   "Extent2".ID_TRANS,
   "Extent2".DATE_TRANSACTION,
   "Extent2".QUANTITE,
   "Extent2".ID_TYPE_TRANS,
   "Extent2".ID_PUBLC AS ID_PUBLC2,
   "Extent2".ID_INTER_DE,
   "Extent2".ID_INTER_A,
   "Extent2".NOTE AS NOTE1,
   "Extent2".ANNEE_INVENTAIRE,
   "Extent2".QUANTITE_PREMIERE_LIVRAISON,
   "Extent2".CODE_UTILISATEUR_MAJ,
   TO_NUMBER(NULL) AS C2,
   TO_NUMBER(NULL) AS C3,
   TO_NUMBER(NULL) AS C4,
   TO_NUMBER(NULL) AS C5,
   CAST(NULL AS TIMESTAMP(9)) AS C6,
   CAST(NULL AS TIMESTAMP(9)) AS C7,
   TO_NCHAR(NULL) AS C8
   FROM  GIPI_NET.PUBLICATIONS "Extent1"
   LEFT OUTER JOIN GIPI_NET.TRANSACTIONS "Extent2" ON "Extent1".ID_PUBLC = "Extent2".ID_PUBLC
UNION ALL
   SELECT
   2 AS C1,
   "Extent3".ID_PUBLC,
   "Extent3".ID_PUBLC AS ID_PUBLC1,
   "Extent3".CODE,
   "Extent3".TITRE,
   "Extent3".DESCRIPTION,
   "Extent3".POIDS,
   "Extent3".DATE_ACTIF,
   "Extent3".DATE_INACTIF,
   "Extent3".NOTE,
   "Extent3".ID_PERD,
   "Extent3".ID_TYPE_PUBLC,
   "Extent3".ID_PUBLC_PARNT,
   "Extent3".QUANTITE_PAR_BOITE,
   "Extent3".ID_INTER,
   TO_NUMBER(NULL) AS C2,
   CAST(NULL AS TIMESTAMP(9)) 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_NCHAR(NULL) AS C9,
   TO_NUMBER(NULL) AS C10,
   TO_NUMBER(NULL) AS C11,
   TO_NCHAR(NULL) AS C12,
   "Extent4".ID_PUBLC_COMND,
   "Extent4".ID_PUBLC AS ID_PUBLC2,
   "Extent4".ID_COMND,
   "Extent4".QUANTITE,
   "Extent4".DATE_LIVRAISON_SOUHAITE,
   "Extent4".DATE_CONFIRMATION_COMPLETEE,
   "Extent4".COMMENTAIRE
   FROM  GIPI_NET.PUBLICATIONS "Extent3"
   INNER JOIN GIPI_NET.PUBLICATION_COMMANDE "Extent4" ON "Extent3".ID_PUBLC = "Extent4".ID_PUBLC) "UnionAll1"
ORDER BY "UnionAll1".ID_PUBLC1 ASC, "UnionAll1".C1 ASC


Is it a bug on your side or did i miss something on my side?

thank you for the help!

alex
skoub
 
Posts: 32
Joined: Fri 21 May 2010 15:47

Re: ORA-12704: character set mismatch

Postby Shalex » Mon 18 Jun 2012 12:03

Shalex
Devart Team
 
Posts: 7460
Joined: Thu 14 Aug 2008 12:44

Re: ORA-12704: character set mismatch

Postby Shalex » Mon 02 Jul 2012 07:02

The config.CodeFirstOptions.UseNonUnicodeStrings configuration option (default value is False) is added in order to treat string properties without an explicitly specified server data type, as non-unicode.

We will post here when the corresponding public build of dotConnect for Oracle is available for download.
Shalex
Devart Team
 
Posts: 7460
Joined: Thu 14 Aug 2008 12:44

Re: ORA-12704: character set mismatch

Postby Shalex » Thu 19 Jul 2012 10:17

New version of dotConnect for Oracle 7.1 is released!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=1&t=24522 .
Shalex
Devart Team
 
Posts: 7460
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle