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
Fetching Unicode data from the database
You must know that if you set UseUnicode option to true then Session.Charset option is ignored. In your case that means that database use UTF16 charset and if your grid sets up on wrong charset then you can get such behaviour. Also we suggest you to download the latest build of ODAC, there were fixed some problems with NLS support.
If the problem persists then pls send us small demo with scripts to create server objects to ODAC support address.
If the problem persists then pls send us small demo with scripts to create server objects to ODAC support address.