Page 1 of 1

ORA-01460: unimplemented or unreasonable conversion requested

Posted: Sun 11 Sep 2005 17:09
by yevgeny
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

Posted: Mon 12 Sep 2005 07:42
by Alex
Please download the last ODAC build (5.55.1.22) and try to reproduce your problem. If problem persists send us small demo project with scripts to create server objects also specify your database charset settings.

Posted: Mon 12 Sep 2005 09:55
by yevgeny
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

Posted: Mon 12 Sep 2005 09:57
by yevgeny
As I mentioned in the firt post, the database character set is UTF8.

Posted: Mon 12 Sep 2005 20:49
by 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

Posted: Tue 13 Sep 2005 06:34
by Paul
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)

Code: Select all

  TWideStringField.AsWideString := WideStringVar;

  TOraParam.DataType := dtWideString;
  TOraParam.AsWideString := WideStringVar;
If you set TOraSession.Option.Charset = UTF8, you must use string values in UTF8 encoding (UTF8String or string types)

Code: Select all

  TStringField.AsString := UTF8Encode(NationalStringVar);
  TStringField.AsString := UT8Var;
 
  TOraParam.DataType := dtString;
  TOraParam.AsString := UT8Var;
If you set TOraSession.Option.Charset = '', you must use string values in 'national charset' encoding (string type)

Code: Select all

  TStringField.AsString := NationalStringVar;
 
  TOraParam.DataType := dtString;
  TOraParam.AsString := NationalStringVar;
You can use one of these three approaches only for one TOraSession component. Please see example in your letter for approache 1.