ORA-01460: unimplemented or unreasonable conversion requested

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
yevgeny
Posts: 15
Joined: Sun 11 Sep 2005 16:51
Location: Israel
Contact:

ORA-01460: unimplemented or unreasonable conversion requested

Post by yevgeny » Sun 11 Sep 2005 17:09

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

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Mon 12 Sep 2005 07:42

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.

yevgeny
Posts: 15
Joined: Sun 11 Sep 2005 16:51
Location: Israel
Contact:

Post by yevgeny » Mon 12 Sep 2005 09:55

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

yevgeny
Posts: 15
Joined: Sun 11 Sep 2005 16:51
Location: Israel
Contact:

Post by yevgeny » Mon 12 Sep 2005 09:57

As I mentioned in the firt post, the database character set is UTF8.

yevgeny
Posts: 15
Joined: Sun 11 Sep 2005 16:51
Location: Israel
Contact:

Post by yevgeny » Mon 12 Sep 2005 20:49

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

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Tue 13 Sep 2005 06:34

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.

Post Reply