Page 1 of 1

ODAC 6.90.0.60 - Direct mode and unicode with plain sql

Posted: Mon 25 Oct 2010 13:53
by jantoni
Hello,

we have the following problem. We use ODAC in direct mode and use plain sql queries like "SELECT * FROM MyTable WHERE Name = 'My name is 兔子'"
We like to have unicode charcters in that query. If we use parameters, everything is fine, but with plain sql the resultset is allways empty.
With other tools (sqldeveloper) it works fine.

As a database we use oracle 11g with unicode charset ("AL32UTF8"). The Tables have fields of type "nvarchar2".
Our development environment is Delphi 2009 with ODAC 6.90.0.60. TOraSession.Options.UseUnicode is "True".

Is there anything we can do in ODAC configuration or is there another solution for this problem?

With best regards

Jörg Antoni

Posted: Tue 26 Oct 2010 06:28
by AlexP
Hello,

To resolve this problem you can set the OraCall.OCIUnicode property to TRUE, to use this property you should add the OraCall unit to the uses section.

Unicode in direct mode - ORA-01461 when changing Row-data

Posted: Tue 26 Oct 2010 07:52
by jantoni
Hallo,

at first, thanks for your quick answer.

with OraCall.OCIUnicode = TRUE the plain sql works fine. But now there is an error while updating or inserting rows by parameterized queries:
"ORA-01461: Ein LONG-Wert kann nur zur Einfügung in eine LONG-Spalte gebunden werden." (German system)

The column we changed, has the type NVarChar2(100). The length of the inserted field content does not matter it works never.
I tried the same with a column of type varChar2. It works well.

Here are the Characterset settings of our Oracle 11g database:
NLS_CHARACTERSET = AL32UTF8
NLS_NCHAR_CHARACTERSET = AL16UTF16

In OCI-Mode everything ís ok.

Have you an idea to solve this problem?

Regards

Jörg Antoni

Posted: Tue 26 Oct 2010 11:37
by AlexP
Hello,

Thank you for the information.
We have reproduced the problem.
We will notify you as soon as we have any results.

Posted: Mon 01 Nov 2010 08:19
by bork
Hello

We have fixed this problem. This fix will be included in the next ODAC build.