unicode char problem in sql in 9.2.7

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
angmar
Posts: 7
Joined: Wed 20 Jun 2007 09:03

unicode char problem in sql in 9.2.7

Post by angmar » Thu 06 Mar 2014 14:07

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 ?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: unicode char problem in sql in 9.2.7

Post by AlexP » Fri 07 Mar 2014 10:07

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;

angmar
Posts: 7
Joined: Wed 20 Jun 2007 09:03

Re: unicode char problem in sql in 9.2.7

Post by angmar » Fri 07 Mar 2014 12:51

OraSession1.Options.UnicodeEnvironment := true; gives chinese errors.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: unicode char problem in sql in 9.2.7

Post by AlexP » Fri 07 Mar 2014 14:48

Please provide the code of the error appearing on connection to the server when the UnicodeEnvironment option is enabled

lrauti
Posts: 18
Joined: Fri 03 Jan 2014 16:22

Re: unicode char problem in sql in 9.2.7

Post by lrauti » Fri 14 Mar 2014 08:28

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...

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: unicode char problem in sql in 9.2.7

Post by AlexP » Wed 07 May 2014 12:27

We have already fixed this proble. The new version with this fix is already available for download at our website.

Post Reply