Error on selecting from table with type that contains ANYDATA

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jdorlon
Posts: 139
Joined: Fri 05 Jan 2007 22:07

Error on selecting from table with type that contains ANYDATA

Post by jdorlon » Tue 05 Nov 2019 17:19

Hello,

If I create this type and table:

Code: Select all

drop table type_with_anydata purge;

CREATE OR REPLACE TYPE Cust_Address_Type_ANY
AS OBJECT
    ( street_address     VARCHAR2(40)
    , postal_code        VARCHAR2(10)
    , city               VARCHAR2(30)
    , state_province     VARCHAR2(10)
    , country_id         CHAR(2)
    , new_dev_column     CHAR(2)
    , something          sys.anydata
    )
/

create table type_with_anydata
(col1 number,
 col2 Cust_Address_Type_ANY);

Insert into TYPE_WITH_ANYDATA
   (COL1, COL2)
 Values
   (1, CUST_ADDRESS_TYPE_ANY('1',NULL,NULL,NULL,NULL,NULL,SYS.ANYDATA.convertVarchar2('This is some data')));
   
Insert into TYPE_WITH_ANYDATA
   (COL1, COL2)
 Values
   (2, CUST_ADDRESS_TYPE_ANY('1',NULL,NULL,NULL,NULL,NULL,SYS.ANYDATA.convertNumber(1234567890)));
   
Insert into TYPE_WITH_ANYDATA
   (COL1, COL2)
 Values
   (3, CUST_ADDRESS_TYPE_ANY('1',NULL,NULL,NULL,NULL,NULL,SYS.ANYDATA.convertDate(TO_DATE('01-JAN-2012','DD-MON-YYYY'))));
commit;
then, in a TSmartQuery tied to a TDBGrid...

Code: Select all

select t.rowid, t.* from type_with_anydata t
...I get this error when I scroll horizontally in the grid over to the ANYDATA field.
"Unknown data type .....\OraObjects.pas, line 2769

Can this be fixed in next version?

I am using Delphi Rad Studio 10.1 Berlin, Oracle 12.2 client and server, ODAC version 10.4.10

Thank you,
John Dorlon

MaximG
Devart Team
Posts: 1486
Joined: Mon 06 Jul 2015 11:34

Re: Error on selecting from table with type that contains ANYDATA

Post by MaximG » Wed 06 Nov 2019 13:55

Thank you for the information. We have reproduced the issue and will investigate its origin. We will inform you about the results shortly.

jdorlon
Posts: 139
Joined: Fri 05 Jan 2007 22:07

Re: Error on selecting from table with type that contains ANYDATA

Post by jdorlon » Fri 24 Jan 2020 17:54

Hey DevArt,

I just wanted to check the status of this. If it hasn't been fixed yet, can you fix it for the next release?

Thanks

John Dorlon

jdorlon
Posts: 139
Joined: Fri 05 Jan 2007 22:07

Re: Error on selecting from table with type that contains ANYDATA

Post by jdorlon » Thu 13 Feb 2020 19:03

Hello,

A similar problem exists if the user-defined type contains SMALLINT.

Please let me know when both can be fixed.

Thank you

-John

Post Reply