Fetching Unicode data from the database
Posted: Sun 06 Mar 2005 10:34
Hello,
We work with Delpi 7 and ODAC Net 5.10.4.13.
Our database is Oracle 9.2.0.4 configured for UTF-8.
We need to show and modify string data in Japanese stored in the database tables in VARCHAR2 data type.
I work with TOraStoredProc component to fetch data. I changed all its fields from TStringField to TWideStringField (size=40).
I configured the following TOraSession properties (I tried to turn on and off each one of these properties):
Session.Options.UseUnicode:=True;
Session.Options.CharLength:=0;
Session.Options.Charset:='UTF8';
I use TNT Unicode DB grid for showing the data.
I see only question marks in the grid.
The problem is somwhere in TOraStoredProc or TOraSession, because:
1. We have a Java application that shows and stores this Japanese data without problems. That means that the data is stored properly.
2. I succeed to show Japanese data in the TNT DB grid when I load this data from a resource DLL to a TVirtualTable component that the grid is connected to through a TOraDataSource component. That means that the grid is also okay.
What I do wrong?
Thanks,
Yevgeny
We work with Delpi 7 and ODAC Net 5.10.4.13.
Our database is Oracle 9.2.0.4 configured for UTF-8.
We need to show and modify string data in Japanese stored in the database tables in VARCHAR2 data type.
I work with TOraStoredProc component to fetch data. I changed all its fields from TStringField to TWideStringField (size=40).
I configured the following TOraSession properties (I tried to turn on and off each one of these properties):
Session.Options.UseUnicode:=True;
Session.Options.CharLength:=0;
Session.Options.Charset:='UTF8';
I use TNT Unicode DB grid for showing the data.
I see only question marks in the grid.
The problem is somwhere in TOraStoredProc or TOraSession, because:
1. We have a Java application that shows and stores this Japanese data without problems. That means that the data is stored properly.
2. I succeed to show Japanese data in the TNT DB grid when I load this data from a resource DLL to a TVirtualTable component that the grid is connected to through a TOraDataSource component. That means that the grid is also okay.
What I do wrong?
Thanks,
Yevgeny