Hi. I have problem with ODAC 6.2. In page about ODAC written that ODAC support Unicode. Now I use TOraSQl component and I connect to Unicode table in Oracle. I can not view Unicode data in table. I see only ANCII code. pls, help me. I think TOraSql doesn't support Unicode ;)
Disclaimer: I only use DevArt Sql Server Data Access Components, but I guess they are similar enough to the Oracle Data Access Components that it doesn't matter for the purpose of answering your question.
For string fields of the database a TWideStringField
component will be created, and its Value
property returns a WideString. Something like:
procedure TForm1.Button1Click(Sender: TObject);
var
i: integer;
w: WideString;
begin
for i := 0 to MSQuery1.FieldCount - 1 do begin
if MSQuery1.Fields[i] is TWideStringField then
w := TWideStringField(MSQuery1.Fields[i]).Value;
end;
end;
So the components most definitely support Unicode, but you can't simply connect a table, a data source component and a grid in Delphi versions prior to Delphi 2009 and expect this to show you Unicode text - the VCL in those Delphi versions isn't able to display Unicode strings. You could use the TNT Unicode Controls, although I can't say whether there are data aware controls (I have no experience with TNT controls).
Alternatively the Virtual Treeview by Mike Lischke works in earlier Delphi versions and is using the Unicode API calls.
But it would be much better to simply use Delphi 2009 with its Unicode-capable VCL.