Unicode with SQL Statement

Hello,

I tested the last beta version 4.1 Beta for Delphi 2009.
It's work fine I can read unicode data. But the SQL statement doesn't work, if I write that

select * from mas_f.gco_good
where GOO_MAJOR_REFERENCE LIKE '单%'

The database doesn't return because DOA cast "单" by "?".

Have you a option or other way for support unicode into SQL statement ?

Thank you for help.
 
If you want to pass Unicode data directly in a SQL statement, the character set of the Oracle Client must be Unicode. If this is not the case, change the NLS_LANG value in the Oracle registry accordingly.
 
yes it's work thanks.

but now with NLS_LANG=AMERICAN_AMERICA.AL32UTF8

If I connected to a database with WE8MSWIN1252 character set, this sql doesn't return,
select * from mas_f.gco_good
where GOO_MAJOR_REFERENCE LIKE '%
 
What exactly do you mean by "doesn't return"? Does it hang?

Maybe you should follow Andrey's suggestion and use bind variables instead. This way you are independent of the client character set.
 
no, it does not hang. Just return zero row.

Yes I know with binding it's work, but I need to use via a script engine.

This SQL
select * from mas_f.gco_good
where GOO_MAJOR_REFERENCE LIKE '%
 
Back
Top