bug in direct mode, select 1 as "durée" from dual fails if UseUnicode is true

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
albourgz
Posts: 160
Joined: Wed 06 May 2009 12:17
Location: belgium

bug in direct mode, select 1 as "durée" from dual fails if UseUnicode is true

Post by albourgz » Fri 17 Apr 2015 16:13

Hi,
Using C++ builder XE6, odac 9.5.15, oracle 11.2.0.3.12 EE.
I encounter a bug. To reproduce: drop a TOraSession on a form, change options: UseUnicode=true, and connect it direct mode to the database.
Then drop a TOraQuery with the following text as query:

Code: Select all

SELECT 1 as "durée" FROM DUAL
=> Try to open query: fails.

However, it works in non-direct mode.
Also:

Code: Select all

SELECT 1 as "durée de temps" FROM DUAL
works in direct mode.

Code: Select all

SELECT 1 as "duree" FROM DUAL
also works in direct mode.

So when UseUnicode is true, and a select ... as "xxx" is used, it fails if xxx holds a string holding an accentuated character and no space.

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

Re: bug in direct mode, select 1 as "durée" from dual fails if UseUnicode is true

Post by AlexP » Mon 20 Apr 2015 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 1 as "durée" FROM DUAL';
  OraQuery1.Open;

albourgz
Posts: 160
Joined: Wed 06 May 2009 12:17
Location: belgium

Re: bug in direct mode, select 1 as "durée" from dual fails if UseUnicode is true

Post by albourgz » Mon 20 Apr 2015 10:43

Why does it work in non-direct mode????

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

Re: bug in direct mode, select 1 as "durée" from dual fails if UseUnicode is true

Post by AlexP » Mon 20 Apr 2015 12:06

This depends on the regional settings of the Oracle client.

Post Reply