Page 1 of 1

Not show Nested Tables fields

Posted: Sun 02 Sep 2012 17:08
by sinys
ODAC 8.2.8

I'm do

Code: Select all

CREATE TYPE XX_TYPE_CHAIR IS TABLE OF VARCHAR2(100);
/
CREATE TABLE CHAIRS (ID NUMBER, CHAIR_NAME  XX_TYPE_CHAIR)
   NESTED TABLE CHAIR_NAME STORE AS NESTED_CHAIRS;

select * from chairs t;
"select" show only ID field, where "CHAIR_NAME" field?

Re: Not show Nested Tables fields

Posted: Mon 03 Sep 2012 13:11
by bork
Hello

To show the CHAIR_NAME field in DBGrid, you should set TOraQuery.ObjectView = True. But if you want to see each element of the CHAIR_NAME field, then you should use the TOraNestedTable component and additional DBGrid that will be linked to TOraNestedTable.

Re: Not show Nested Tables fields

Posted: Wed 05 Sep 2012 07:08
by sinys
But with TOraQuery.ObjectView = True
select MyType(field1, field2) from ...
show as 1 field,
How show MyType as many fields and show nested tables fields?

Re: Not show Nested Tables fields

Posted: Thu 06 Sep 2012 06:38
by sinys
up

Re: Not show Nested Tables fields

Posted: Thu 06 Sep 2012 10:29
by bork
As I wrote before, you should use TOraNestedTable and an additional DBGrid to get all values that are stored in the nested table fields. Independently on TOraQuery.ObjectView (True or False), it is unavailable to get all values for nested table fields in the same DBGrid. To help you resolve this issue we need more information: please describe what are you going to do with nested table fields?

Re: Not show Nested Tables fields

Posted: Thu 06 Sep 2012 11:40
by sinys
I mean that if I set TOraQuery.ObjectView = True then "create type MyType ..."
"select MyType(field1, field2) from ..." return 1 field as TADTField
I want to see from "select CHAIR_NAME, MyType(ID, AA, BB) from ..."
CHAIR_NAME, MyType.ID, MyType.AA, MyType.BB
but I see only CHAIR_NAME and MyType (as TADTField)

Re: Not show Nested Tables fields

Posted: Fri 07 Sep 2012 14:08
by bork
Now there is no possibility to set object view for one field, but not to set for another. We will investigate the possibility of adding this feature in one of the next builds/versions of ODAC. But now we recommend to use TOraNestedTable and separate DBGrid to show nested table fields.

Re: Not show Nested Tables fields

Posted: Sun 30 Jun 2013 21:20
by sinys
Delphi XE2, ODAC 9.0.1,
Error: Access violation at address 61055D54 in module 'oracommon11.dll'. Write of address 10000000.
demo

Code: Select all

OraQuery1.Sql.Text := 'select * from chairs t'; // table have 2 records
OraQuery1.Open;
OraQuery1.Next; // - OK
OraQuery1.Close;
OraQuery1.FetchRows := 1000;
OraQuery1.Options.ScrollableCursor := True;
OraQuery1.Open; 
OraQuery1.Next; // - raise exception 

Re: Not show Nested Tables fields

Posted: Mon 01 Jul 2013 11:40
by AlexP
Hello,

Thank you for the information, we have reproduced the problem and will try to fix it as soon as possible.