Page 1 of 1

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

Posted: Fri 17 Apr 2015 16:13
by albourgz
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.

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

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

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

Posted: Mon 20 Apr 2015 10:43
by albourgz
Why does it work in non-direct mode????

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

Posted: Mon 20 Apr 2015 12:06
by AlexP
This depends on the regional settings of the Oracle client.