DIRECT mode fails when working with UNICODE
Posted: Thu 11 Dec 2008 18:51
I could not make ODAC read/write UNICODE symbols in NVARCHAR2 fields when in DIRECT mode.
I'm evaluating WinXP SP2 + Delphi 6 (with TNT Unicode VCLs) + ODAC 6.50 against Win2003 + Oracle 10GR2 running in CL8MSWIN1251
In the DB I have a table with a NVARCHAR2 field.
In Delphi my Session.Options.Direct = True and
Session.Options.UseUnicode = True, Also I have an OraQuery connected to the table and a TNTGrid.
When try to write Über ( a word in Deutsch) in a TNTGrid and save it to DB I can see the word correct in TNTDBGrid but when I POST to DB, it loses the special symbol(Ü). I've also get the same problem trying to write Turkish and Spanish words containing non-standard latin symbols.
The only non-latin symbol I write/read successfuly are Bulgarian letters (I suppose because of the server CHARACTERSET).
The most strange thing is
If I set Session.Options.Direct = False I can read and write unicode symbols from/to the DB without any limitations.
In this forum I came upon this topic http://devart.com/forums/viewtopic.php?t=12200
So I've tryed to connect using Options.Charset = 'CL8MSWIN1251' and ''
Also I've changed session parametes on Session.OnAfterConnect through
ALTER SESSION SET NLS_LANGUAGE = 'BULGARIAN';
ALTER SESSION SET NLS_TERRITORY = 'BULGARIA';
but nothing led to successful writing to DB.
As I have no problems when using ODAC through Oracle client I suppose there is a missfunction in ODAC VCL when in DIRECT mode.
Please give me some direction how to use ODAC in DIRECT mode in my situation.
I'm evaluating WinXP SP2 + Delphi 6 (with TNT Unicode VCLs) + ODAC 6.50 against Win2003 + Oracle 10GR2 running in CL8MSWIN1251
In the DB I have a table with a NVARCHAR2 field.
In Delphi my Session.Options.Direct = True and
Session.Options.UseUnicode = True, Also I have an OraQuery connected to the table and a TNTGrid.
When try to write Über ( a word in Deutsch) in a TNTGrid and save it to DB I can see the word correct in TNTDBGrid but when I POST to DB, it loses the special symbol(Ü). I've also get the same problem trying to write Turkish and Spanish words containing non-standard latin symbols.
The only non-latin symbol I write/read successfuly are Bulgarian letters (I suppose because of the server CHARACTERSET).
The most strange thing is
If I set Session.Options.Direct = False I can read and write unicode symbols from/to the DB without any limitations.
In this forum I came upon this topic http://devart.com/forums/viewtopic.php?t=12200
So I've tryed to connect using Options.Charset = 'CL8MSWIN1251' and ''
Also I've changed session parametes on Session.OnAfterConnect through
ALTER SESSION SET NLS_LANGUAGE = 'BULGARIAN';
ALTER SESSION SET NLS_TERRITORY = 'BULGARIA';
but nothing led to successful writing to DB.
As I have no problems when using ODAC through Oracle client I suppose there is a missfunction in ODAC VCL when in DIRECT mode.
Please give me some direction how to use ODAC in DIRECT mode in my situation.