Error with collection types

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

Error with collection types

Post by jdorlon » Wed 19 Aug 2009 18:24

Hello,

I am using the latest ODAC with Delphi 2009. Oracle 11g client and server.

I have the following table:

Code: Select all

create type t_selection_row as varray(200) of number(3);

create type t_selection_row_list as varray(200) of t_selection_row;

CREATE TABLE Sal_Coupon2 (
       Coupon_Id            VARCHAR2(20) NOT NULL,
       Batch_Prn            NUMBER(15) NULL,
       Selection_Area       t_selection_row_list,
       Active               CHAR(1) NULL
                                   CONSTRAINT y_n402
                                          CHECK (Active IN ('Y', 'N')),
       CONSTRAINT Sal_Coupon2XPK 
              PRIMARY KEY (Coupon_Id)
)
    organization index
;

insert into Sal_Coupon2 values ('ABC123',1,t_selection_row_list(t_selection_row(1,2,3,4,5,6,7),t_selection_row(28,29,30,31,32,33,34)),'Y');

commit;
Now, when I put this query into a TSmartQuery with ObjectView enabled and tied to a TDBGrid:

select * from sal_coupon2

....I get this error: Field 'SELECTION_AREA[0][0]' not found

If there is a change I can make to my source to fix it, please let me know.

Thanks.

-John

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 21 Aug 2009 07:56

Array of array is not supported on the level of standard TDataSet class (see TFieldDefList.UpdateList in the DB unit).

We'll consider the possibility to find a workaround in future ODAC versions.

Post Reply