Page 1 of 1

How to set OCI Unicode environment use in 9.2.5?

Posted: Thu 09 Jan 2014 15:25
by MarkF
It looks like the OraCall.OCIUnicode setting is no longer used (there's a note in the code about it being deprecated.) What's the new way to turn OCIUnicode on?

-Mark Ford
Benthic Software

Re: How to set OCI Unicode environment use in 9.2.5?

Posted: Fri 10 Jan 2014 10:02
by AlexP
Hello,

This option is obsolete and left for backward compatibility. Now you should use the TOraSession.Options.UnicodeEnvironment property.

Re: How to set OCI Unicode environment use in 9.2.5?

Posted: Fri 10 Jan 2014 11:52
by MarkF
That was the first thing I tried but it doesn't appear to be hooked up. You can test it by running a query that has a unicode literal in it or by just putting a breakpoint in procedure TOCIEnvironment.Init and observing that the UnicodeEnv variable is never True (in my testing.)

-Mark
Benthic Software

Re: How to set OCI Unicode environment use in 9.2.5?

Posted: Fri 10 Jan 2014 13:45
by AlexP
Hello,

Thank you for the information. We have reproduced and fixed the problem. This fix will be included to the next ODAC version. For the time being, to solve the problem, you should make the following changes in the TOraSession.GetOCIConnection method, the Ora.pas module:

After the line

Code: Select all

ConnectionParameters.UseUnicode := Options.UseUnicode;
add

Code: Select all

ConnectionParameters.UnicodeEnvironment := Options.UnicodeEnvironment;
And after

Code: Select all

Result.SetProp(prUseUnicode, Options.UseUnicode);
add

Code: Select all

Result.SetProp(prUnicodeEnvironment, Options.UnicodeEnvironment);

Re: How to set OCI Unicode environment use in 9.2.5?

Posted: Fri 10 Jan 2014 17:34
by MarkF
Thank you, that fixed the issue.

-Mark
Benthic Software

Re: How to set OCI Unicode environment use in 9.2.5?

Posted: Sat 11 Jan 2014 09:56
by AlexP
Hello,

Glad to see that the problem was solved. If you have any other questions, feel free to contact us.

Re: How to set OCI Unicode environment use in 9.2.5?

Posted: Sun 02 Mar 2014 21:12
by RoniLev
Hi there
I have the same problem.
I this problem solved in the last version on download page?

Oracle Data Access Components Standard 9.2.7 25-Feb-2014

Regards
Roni

Re: How to set OCI Unicode environment use in 9.2.5?

Posted: Mon 03 Mar 2014 09:23
by AlexP
This problem is already fixed. Please download the latest ODAC version 9.2.7

Re: How to set OCI Unicode environment use in 9.2.5?

Posted: Thu 06 Mar 2014 13:37
by angmar
I have upgraded odac to 9.2.7 but this problem is going on for my project.
I could use turkish chars in sql text like "select 'öçşiğü' from dual" without problem.
After I passed to 9.2.5, I could not use these chars in sql correctly.
My code uncludes these lines:

Code: Select all

    myTOraSession.Options.UseUnicode := True;
    myTOraSession.Options.Charset := 'UTF8'
    OCIUnicode := True;
Also when I enable unicodeenvironment, I can not connect to oracle. I get a kind of chinese error :(
How I can I solve this ?

Re: How to set OCI Unicode environment use in 9.2.5?

Posted: Fri 07 Mar 2014 09:57
by AlexP
The OCIUnicode variable must be set before creating a TOraSession instance.

Re: How to set OCI Unicode environment use in 9.2.5?

Posted: Fri 07 Mar 2014 12:38
by angmar
OCIUnicode := True;
this code does not work whereever I write, I could not see turkish chars in sql in grid.
I am not glad for 9.2.7 version.
Unicodenvironment = true; does not work too.
It was working in previous versions and new solutions do not solve my problem.
Where am I wrong ?
when I downgrade to 9.1.4 and my problem is solved

Re: How to set OCI Unicode environment use in 9.2.5?

Posted: Tue 11 Mar 2014 10:21
by AlexP
Please send me results of the following queries:

Code: Select all

SELECT USERENV ('language') from dual; 

SELECT * FROM V$NLS_PARAMETERS;