Page 1 of 1

unicode char problem in sql in 9.2.7

Posted: Thu 06 Mar 2014 14:07
by angmar
When I use turkish chars in SQL string, I can not see thees chars correct.
For example, "select 'öçşiğü' from dual" query result seems wrong. I see something like this "?????" word with question marks.
Unfortunately, this error started after I upgraded odac to 9.2.7
What is the solution for this version of ODAC ?

Re: unicode char problem in sql in 9.2.7

Posted: Fri 07 Mar 2014 10:07
by AlexP
Hello,

For correct display of unicode symbols, you should enable the following options: UseUnicode and UnicodeEnvironment

Code: Select all

  OraSession1.Options.UseUnicode := True;
  OraSession1.Options.UnicodeEnvironment := true;

  OraQuery1.SQL.Text := 'Select ''öçşiğü'' from dual';
  OraQuery1.Open;

Re: unicode char problem in sql in 9.2.7

Posted: Fri 07 Mar 2014 12:51
by angmar
OraSession1.Options.UnicodeEnvironment := true; gives chinese errors.

Re: unicode char problem in sql in 9.2.7

Posted: Fri 07 Mar 2014 14:48
by AlexP
Please provide the code of the error appearing on connection to the server when the UnicodeEnvironment option is enabled

Re: unicode char problem in sql in 9.2.7

Posted: Fri 14 Mar 2014 08:28
by lrauti
I am using the latest ODAC 9.2.7 with XE5 (with Oracle 11g) and I also get an error message with chinese characters.

Set the following options to TOraSession component:

Options.Direct := True
Options.UnicodeEnvironment := True
Options.UseUnicode := True
Schema := 'system'
Username := 'system'
Server := 'localhost:1521:SID=example'
Password := <password>
LoginPrompt := False

Now set Connected := True and there will be a nasty error...

Re: unicode char problem in sql in 9.2.7

Posted: Wed 07 May 2014 12:27
by AlexP
We have already fixed this proble. The new version with this fix is already available for download at our website.