Page 1 of 1
Collection datatype FAIL
Posted: Thu 07 Aug 2014 00:21
by sinys
ODAC 9.3.10 XE2 Oracle 11g
Code: Select all
OraSession1.ConnectString := 'Login Prompt=False;User ID=system;Password=manager';
OraSession1.Connect;
OraQuery1.SQL.Text := 'select cast(multiset(select level from dual connect by level<=10)as sys.ku$_objnumset) from dual';
OraQuery1.Open;
ShowMessage(IntToStr(OraQuery1.FieldCount));
Function ShowMessage return 0 (ZERO), why? I think this is error.
Re: Collection datatype FAIL
Posted: Fri 08 Aug 2014 05:44
by AlexP
Hello,
Such behaviour is related to the TDataSet.CreateFields method implementation in Delphi. The field type in your example is ftDataSet. In this case, a field is created if the DataSet ObjectView property is set to TRUE. So to resolve the problem, you need either set ObjectView to TRUE or create the Persistent Field in the design time.
Re: Collection datatype FAIL
Posted: Thu 14 Aug 2014 16:10
by sinys
But in this mode I see ftADT field like 1 field, but I want to see it like ObjectView = False. Make individual setting for it, please.
Re: Collection datatype FAIL
Posted: Fri 15 Aug 2014 09:18
by AlexP
We cannot change the ObjectView property value to True by default for ftDataSet fields, as this will cause changes in behaviour and errors in applications of our components users. If you have a Source Edition, we can show you where to add necessary changes.
Re: Collection datatype FAIL
Posted: Fri 15 Aug 2014 15:27
by sinys
I have Source Edition, but I don't want to change the source code of components in every new version. I don't propose to change the behavior of the ObjectView property, I ask you to add new property like FlatADTView (default false for not changing standard behavior of TOraQuery).
Example:
Code: Select all
create or replace type ComplexType as object(
x varchar2(100),
y varchar2(100)
);
/
---------
OraQuery1.SQL.Text := 'select ComplexType(CODE, name) A from TEST';
OraQuery1.ObjectView := True;
OraQuery1.FlatADTView := True; (new property)
OraQuery1.Open;
And I want to see:
like OraQuery1.ObjectView := False but this variant friendly for collections datatype.
Re: Collection datatype FAIL
Posted: Mon 18 Aug 2014 10:25
by AlexP
You can leave a suggestion to implement this feature at our uservoice page:
http://devart.uservoice.com/forums/1046 ... components . Terms of the implementation will depend on the number of voices at Uservoice.
Re: Collection datatype FAIL
Posted: Mon 18 Aug 2014 12:43
by sinys
I added my request
http://devart.uservoice.com/forums/1046 ... latadtview and some my collegs and clients voited for it already. But I think we are more speaking about it that doing it, because I asked about it long time ago
http://forums.devart.com/viewtopic.php?f=5&t=28337 http://forums.devart.com/viewtopic.php?f=5&t=24825
Re: Collection datatype FAIL
Posted: Thu 21 Aug 2014 07:42
by AlexP
We implement new features depending on their complexity and relevance. These features are included to our ODAC development roadmap, however, their implementation is not planned for the nearest future.
Re: Collection datatype FAIL
Posted: Thu 21 Aug 2014 13:58
by sinys
Ok, please, show me what I must to change in source code for achive above behavior.
Re: Collection datatype FAIL
Posted: Tue 26 Aug 2014 08:24
by AlexP
To solve the problem, you should set the ObjectView property to True in the TOraDataSet.Create class constructor:
Code: Select all
constructor TOraDataSet.Create(Owner: TComponent);
begin
inherited Create(Owner);
CheckMode := cmNone;
FSequenceMode := smPost;
ObjectView := True;
{$IFNDEF FPC}
NestedDataSetClass := TOraNestedTable;
{$ENDIF}
end;
Re: Collection datatype FAIL
Posted: Tue 26 Aug 2014 17:00
by sinys
Code: Select all
constructor TOraDataSet.Create(Owner: TComponent)
..
ObjectView := True;
This mean that all TOraDataSet in my applications will have this behavior but I want this behavior only for 2 datasets in one of my application.
Re: Collection datatype FAIL
Posted: Wed 27 Aug 2014 11:33
by AlexP
Yes, this modification will affect all the fields of this type.
Re: Collection datatype FAIL
Posted: Wed 27 Aug 2014 12:15
by sinys
Could you please show me variant that I can use to 1-2 OraQuery only?
Re: Collection datatype FAIL
Posted: Thu 04 Sep 2014 11:57
by AlexP
Even if you set the ObjectView property in the constructor to True, this property will also be set to True in the DataSet, that own this field. Therefore you can just set the ObjectView property to True of the required DataSets.