Hi,
Our database is Oracle 9.2.0.4 installed on Sun Solaris. Database character set is UTF8.
The database is accessed from the Delphi 7 application using ODAC components 5.50.0.16 (Net option).
I have a stored procedure, which has many IN parameters of different types and one OUT parameter of type cursor. One of the IN parameters is of type VARCHAR.
When a regular English string is passed to this parameter, it works properly; when a Japanese string is passed, I receive an Oracle exception: “ORA-01460: unimplemented or unreasonable conversion requested”.
This error occurs before entering the procedure’s body. Checking user trace files didn’t help.
I tried to change different properties of TOraSession, such as UseUnicode, CharSet and CharLength - nothing helped.
I'm working in Japanese locale, but the problem occurs in both English and Japanese locales.
Thanks,
Yevgeny
ORA-01460: unimplemented or unreasonable conversion requested
Hi,
I installed 5.55.1.22 and the problem persists.
A test project and a package script were sent by email to [email protected] and [email protected].
Thanks,
Yevgeny
I installed 5.55.1.22 and the problem persists.
A test project and a package script were sent by email to [email protected] and [email protected].
Thanks,
Yevgeny
Hi,
I set both TOraSession.Option.Charset = UTF8 and TOraSession.Option.UseUnicode = True. I tried these setting before that as well as using the UTF8Encode function, but I didn’t try the combinations of all 3 together.
Basically it works without TOraSession.Option.UseUnicode = True, but in that case I see wrong text in the grid.
Now it works in Japanese locale, I didn’t test it yet in English locale.
Thanks for the professional and fast support,
Yevgeny
I set both TOraSession.Option.Charset = UTF8 and TOraSession.Option.UseUnicode = True. I tried these setting before that as well as using the UTF8Encode function, but I didn’t try the combinations of all 3 together.
Basically it works without TOraSession.Option.UseUnicode = True, but in that case I see wrong text in the grid.
Now it works in Japanese locale, I didn’t test it yet in English locale.
Thanks for the professional and fast support,
Yevgeny
There is no sense to set both TOraSession.Option.Charset = UTF8 and TOraSession.Option.UseUnicode = True. It is equivalent to TOraSession.Option.UseUnicode = True and forces ODAC to work with UTF16 and WideString.
If you set TOraSession.Option.UseUnicode = True, you must use string values in UTF16 encoding (WideString type)
If you set TOraSession.Option.Charset = UTF8, you must use string values in UTF8 encoding (UTF8String or string types)
If you set TOraSession.Option.Charset = '', you must use string values in 'national charset' encoding (string type)
You can use one of these three approaches only for one TOraSession component. Please see example in your letter for approache 1.
If you set TOraSession.Option.UseUnicode = True, you must use string values in UTF16 encoding (WideString type)
Code: Select all
TWideStringField.AsWideString := WideStringVar;
TOraParam.DataType := dtWideString;
TOraParam.AsWideString := WideStringVar;
Code: Select all
TStringField.AsString := UTF8Encode(NationalStringVar);
TStringField.AsString := UT8Var;
TOraParam.DataType := dtString;
TOraParam.AsString := UT8Var;
Code: Select all
TStringField.AsString := NationalStringVar;
TOraParam.DataType := dtString;
TOraParam.AsString := NationalStringVar;