Page 1 of 1

ORA-12704 (character set mismatch) in a latest build

Posted: Tue 18 Jan 2011 08:22
by object
I read that the problem with exceptions raised on converting between VARCHAR2 and NVARCHAR2 in Oracle is solved. However we are still getting this error.

Here's an example of LINQ statement:

var programmes = from p in dataContext.Programmes
join pv in dataContext.PiProgramView on p.ProgId equals pv.ProgId
select new
{
Title = p.ProgrammesTitlesMap.FirstOrDefault().Titles.Title ?? pv.ProgramTitle,
};

Titles.Title er NVARCHAR2(xx)
PiProgramView.Title er VARCHAR(yy)

Extract from the generated statement:

CASE
WHEN ("Project5".TITLE IS NULL) THEN "Project5".PROGRAM_TITLE
ELSE "Extent7".TITLE
END

We are using dotConnect build 6.0.86.0. Does it mean that there is still issue with character set in it?

Posted: Wed 19 Jan 2011 15:19
by AndreyR
We will investigate the possibility to make some changes in the behaviour of our provider to handle this scenario, but I don't have any timeframe for this functionality to be implemented.
As a workaround I recommend you either to change the type of the VARCHAR2 columns to NVARCHAR2 (if it's possible), or write Defining Queries for each type you need to use in the ?? operator.
Here is an example:

Code: Select all

SELECT ID, F_CHAR, CAST(F_VARCHAR AS NVARCHAR2(2000)) AS F_VARCHAR FROM ENTITY.CHAR_TYPES
You can easily add Defining Queries using Devart Entity models, just open a model, go to Model Explorer, open the Model.Store node, right-click the necessary table, and select the Properties option.
Click the ellipsis near the Defining Query property and set the query as in my example.
Unfortunately, you'll have to write a set of Stored Procedures for the CUD opertaions on the modified entity (updatable view in Oracle should not have virtual columns).

Posted: Wed 19 Jan 2011 15:26
by object
Andrey,

Thank you for the investigation. I understand resolution may take some time, and we will try to apply the workaround you suggested.

Posted: Fri 18 Mar 2011 15:13
by AndreyR
We have implemented the creation of a new Unicode column based on Unicode and non-Unicode columns.
The new build will be available in a week or so.

Posted: Thu 07 Apr 2011 13:03
by AndreyR
The new build of dotConnect for Oracle 6.10.135 is available for download now. This build fixes the problem with Unicode.
It can be downloaded from Download Page (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to this post.