Print Thread
Page 2 of 3 1 2 3
Re: How to update SDO_GEOMETRY column
#5962 02/10/04 01:46 PM
Joined: Feb 2004
Posts: 7
M
Member
OP Offline
Member
M
Joined: Feb 2004
Posts: 7
That was exactly the example I wanted. Many, many thanks!!
There seems nothing left, you can't do with DOA... laugh

Re: How to update SDO_GEOMETRY column
#5963 02/10/04 03:30 PM
Joined: Nov 2003
Posts: 89
Germany
A
al0 Offline
Member
Offline
Member
A
Joined: Nov 2003
Posts: 89
Germany
[quote]Originally posted by Marco Kalter:
Nested tables are updateable. Varrays are currently read-only. This will be addressed in a future release. [/quote]With TOracleQuery, yes. But my question was concerning the TOracleataset. If I put in the sql
statement that selects nested tables/varray columns they even not appears in Fields (or FieldDefs) properties of dataset!

Re: How to update SDO_GEOMETRY column
#5964 02/10/04 10:59 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
[quote]Originally posted by al0:
With TOracleQuery, yes. But my question was concerning the TOracleataset. If I put in the sql statement that selects nested tables/varray columns they even not appears in Fields (or FieldDefs) properties of dataset! [/quote]That is correct. However, if you add a detail dataset and select the dataset with the collection attributes or columns as the master, the detail dataset will be populated with the collection records.


Marco Kalter
Allround Automations
Re: How to update SDO_GEOMETRY column
#5965 02/11/04 03:40 AM
Joined: Nov 2003
Posts: 89
Germany
A
al0 Offline
Member
Offline
Member
A
Joined: Nov 2003
Posts: 89
Germany
[quote]Originally posted by Marco Kalter:
[QUOTE]Originally posted by al0:
[qb] However, if you add a detail dataset and select the dataset with the collection attributes or columns as the master, the detail dataset will be populated with the collection records.
[/quote]How I can find at runtime which collections I have in master dataset? How can I specify for detail dataset which of collection from master datase shall it represent?

The code used at design time in OracleData.pas is, in essence, incorrect shocked (at least as far as I can undestand it), as it provides not the collections present in SELECT but collections from "updating table" of that select. So it may propose some unselected columns and will not propose some explicitly selected columns (yes, later are not updatable but anyway user want to see them).

And it seems that one more issue exists frown - collection are selected by the internal TOracleQuery of Master dataset completely unavailable from outside frown and then reselected by detail dataset. so they are selected twice effectively wasting the memory and execution time (especially for big collections).

Shortly, it doesn't deals with selected collections, it tries to re-select it with his own SQL. It more or less Ok from collections that come from the tables, but collection may appears to select in many other ways - e.g. as resul of function calls, direct creation in the select list (select TABLE(MyNumberCollection(1,2,3,4,5)) from dual) etc. So to hanle collection (at least in read-only mode) via TDataset are need or collection-type field in TOracleDataSet or special dataset descendant like TCollectionWrapperDataset. confused

Re: How to update SDO_GEOMETRY column
#5966 02/11/04 11:08 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
For performance purposes you can omit the collection field(s) from the select statement of the master dataset. It is not needed.

If you check the SQL text of the detail dataset, you will notice that it is a select statement on the collection that references the primary key of the master dataset. This is really all that is required.


Marco Kalter
Allround Automations
Re: How to update SDO_GEOMETRY column
#5967 02/12/04 05:05 AM
Joined: Nov 2003
Posts: 89
Germany
A
al0 Offline
Member
Offline
Member
A
Joined: Nov 2003
Posts: 89
Germany
[quote]Originally posted by Marco Kalter:
For performance purposes you can omit the collection field(s) from the select statement of the master dataset. It is not needed.

If you check the SQL text of the detail dataset, you will notice that it is a select statement on the collection that references the primary key of the master dataset. This is really all that is required.
[/quote]What to do if master dataset has no primary key?
What to do i collections comes not from "updating table" of the query?
What to do if collection is not taken from the table but is caulculated by function ?

Is it any chance to see (read-only) such collection throgh dataset? BTW I have taken short look on trial version on ODAc - it does it easily.

Re: How to update SDO_GEOMETRY column
#5968 02/12/04 10:25 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
You can access any collection, as long as you can think of a select statement to fetch its records.


Marco Kalter
Allround Automations
Re: How to update SDO_GEOMETRY column
#5969 02/13/04 01:38 AM
Joined: Nov 2003
Posts: 89
Germany
A
al0 Offline
Member
Offline
Member
A
Joined: Nov 2003
Posts: 89
Germany
[quote]Originally posted by Marco Kalter:
You can access any collection, as long as you can think of a select statement to fetch its records. [/quote]I repeat once more - yes, with TOraQuery I can.

The question was abour TOracleDataset - if I put in run-time in its the select property the select that contains collection in the select list the fields property contains no fields for those collection. E.g. if I have
Code
select MyNumber,MyCollection,MyChar from MyView
the fields property of the dataset contains only 2 filds - Fields[0] represents MyNumber and Fields[1] represents MyChar. MyCollection is skipped over. I ever is unable to determine that this select returns some collections (if I don't know it in advance.

Probably I don't understand something eek then point me out how to deal with TOracleDataset and collections in run-time, with sample code if possible.

So I need the following:
  • assign to SQL property of TOracleDataSET some SELECT statement
  • Execute select
  • Check the results of select and find if any collections are among results
  • Present this collection to the user, desirable in data-aware grids

I wish to note that nor the select statement nor types in collections are known in advance.

Thank you in advance.

Re: How to update SDO_GEOMETRY column
#5970 02/13/04 10:19 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
I will post an example shortly that will clarify this.


Marco Kalter
Allround Automations
Re: How to update SDO_GEOMETRY column
#5971 02/14/04 01:15 AM
Joined: Nov 2003
Posts: 89
Germany
A
al0 Offline
Member
Offline
Member
A
Joined: Nov 2003
Posts: 89
Germany
[quote]Originally posted by Marco Kalter:
I will post an example shortly that will clarify this. [/quote]Thanks. Wait impatiently. :rolleyes:

Page 2 of 3 1 2 3

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.036s Queries: 14 (0.011s) Memory: 2.5636 MB (Peak: 3.0379 MB) Data Comp: Off Server Time: 2024-05-06 00:45:27 UTC
Valid HTML 5 and Valid CSS