Query with unicode data

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Adil
Posts: 1
Joined: Wed 23 Aug 2006 11:21
Location: Azerbaijan
Contact:

Query with unicode data

Post by Adil » Wed 23 Aug 2006 12:08

Hello.

How I can send query with unicode parameters. For example:

OraQuery1.SQL.Text='
SELECT * FROM "ADIL"."USERS" WHERE "username"='+usr;

Where usr is widestring.

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

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

Post by Plash » Wed 23 Aug 2006 13:12

Set UseUnicode option of TOraSession to True. Then you can assign to TOraQuery.SQL property value:

Code: Select all

SELECT * FROM "ADIL"."USERS" WHERE "username"=:usr
Set DataType for USR parameter to ftWideString and assign value to this parameter using AsWideString property.

Post Reply