6.70 beta and Unicode SQL
6.70 beta and Unicode SQL
Should unicode characters in the SQL query text work with D2009 and the 6.7 beta? I'm trying a simple "SELECT 'Some Unicode Text' FROM DUAL" query and it looks to be converting back to ansi text in the call to the server. Is it planned to support unicode query text, or am I missing a setting somewhere?
Thanks!
-Mark Ford
Benthic Software
Thanks!
-Mark Ford
Benthic Software
We have added support for OCI Unicode Environment in ODAC 6.70. But it is disabled by default because OCI has some bugs with Unicode Environment.
You can enable it by setting the OCIUnicode global variable from the OraCall unit to True. In this case you must also set the UseUnicode option of TOraSession to True.
You can enable it by setting the OCIUnicode global variable from the OraCall unit to True. In this case you must also set the UseUnicode option of TOraSession to True.
Hi there,
I just download the trial version and try to test the Unicode support. I changed UseUnicode option of TOraSession to True but I don't know how to change OCIUnicode global variable. I try to update a table with Unicode characters but the result still return '???'.
Any help is much appreciated.
Thanks
puyo
I just download the trial version and try to test the Unicode support. I changed UseUnicode option of TOraSession to True but I don't know how to change OCIUnicode global variable. I try to update a table with Unicode characters but the result still return '???'.
Any help is much appreciated.
Thanks
puyo
Setting the OCIUnicode variable is required only to enable Unicode characters in text of SQL statements.If you enter Unicode characters in TDBGrid component, for example, setting the OCIUnicode variable is not required.
Please check that your database has UTF8 encoding, or you use NCHAR and NVARCHAR columns.
Please check that your database has UTF8 encoding, or you use NCHAR and NVARCHAR columns.
Thanks Plash and MarkF. I create the table using the following SQL
create table utable (id number(6),
name NVARCHAR2(100)
)
and I insert values using
insert into utable values (1, '閒話家常')
when I try to retrieve the result from TDBGrid/SQL Plus, it returns
ID NAME
================================
1 | ????
UseUnicode option of TOraSession set to True. Am I missed something?
Thanks
create table utable (id number(6),
name NVARCHAR2(100)
)
and I insert values using
insert into utable values (1, '閒話家常')
when I try to retrieve the result from TDBGrid/SQL Plus, it returns
ID NAME
================================
1 | ????
UseUnicode option of TOraSession set to True. Am I missed something?
Thanks
You need to set the OCIUnicode variable because you are using Unicode characters in the SQL property. Add OraCall unit to USES, and add the following code in the end of your unit:
Code: Select all
initialization
OCIUnicode := True;
end.