unicode SQL Text support

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
tkdsong
Posts: 5
Joined: Wed 11 Oct 2006 02:40

unicode SQL Text support

Post by tkdsong » Fri 27 Apr 2007 02:01

Hello.

How I can send query with unicode SQL Text.
For example:

OraQuery1.SQL.Text='
SELECT (unicode text - '한글') FROM table WHERE "compname"=:compname;


Where SELECT () is widestring.

If it`s not possible, what tricks I can use??

and, you said "ODAC does not support using Unicode strings in the SQL property of ODAC components."
Would you this support is not plain?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 27 Apr 2007 07:45

The SQL property of TOraQuery should contain text in the character set that is set in the NLS_LANG parameter from the Windows registry or environment variable.
If the character set in the NLS_LANG parameter is the same as your Windows non-Unicode character set, and '한글' characters are present in the Windows non-Unicode character set, you can use these characters in the SQL property.

We'll consider possibility to support Unicode in the SQL property in either of the next ODAC versions.

BenSteiner
Posts: 3
Joined: Mon 05 Nov 2012 15:48

Re: unicode SQL Text support

Post by BenSteiner » Tue 06 Nov 2012 07:57

Hello Devart Team,

will you implement the unicode support for the sql.text property or not?
I still tried the version 8 of odac and it is not working there.

Sincerely
Benjamin Steiner

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

Re: unicode SQL Text support

Post by AlexP » Tue 06 Nov 2012 13:07

Hello,

To make such query work, you should set the UseUnicode option and OCIUnicode (declared in OraCall) to True

Code: Select all

uses ..., OraCall;
....
  OCIUnicode := true;
  OraSession1.Connect;
  OraQuery1.SQL.Text := 'SELECT  ''한글'' FROM DUAl';
  OraQuery1.Open;

BenSteiner
Posts: 3
Joined: Mon 05 Nov 2012 15:48

Re: unicode SQL Text support

Post by BenSteiner » Wed 07 Nov 2012 07:32

Hello,

i will try this.

Thank you for your Help.

BenSteiner
Posts: 3
Joined: Mon 05 Nov 2012 15:48

Re: unicode SQL Text support

Post by BenSteiner » Wed 07 Nov 2012 08:02

It works :)

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

Re: unicode SQL Text support

Post by AlexP » Wed 07 Nov 2012 08:17

hello,

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

Post Reply