Hello Marco,
I have an application (D5, Oracle 10.1.0.2.0, DOAD 4.0.7.1)
that acesses 4 tables which are related as follows:
1. articles: master table
2. remarks: detail table (exactly 1 record for each record of articles)
3. shipping: detail table (at least 1, possibly more records for each record of articles)
4. surcharge: detail table (possibly 1 or more records for each record of articles)
There's 1 Toracledataset for each of the tables all using the same OracleSession.
I have set the master property of the 3 detail datasets to the master dataset.
Now here's my questions:
In the Helpfiles (about TOracleSession.ApplyUpdates) there is stated that
in a master/detail relation each dataset must have its CachedUpdates property set to True
in order to have the updates in all detail datasets automatically applied along with the master dataset...
However, i don't want the user to be able to apply more than one master record at a time.
Also one of the detail datasets should be limited to have exactly 1 record for each master dataset.
How can i achieve this?
How do i have to invoke TOracleSession.ApplyUpdates?
like: OracleSession.ApplyUpdates([dsmaster,dsdetail1,dsdetail2,dsdetail3])
or does: OracleSession.ApplyUpdates([dsmaster]) do the trick?
Where should i best check for valid entries before applying/commiting changes?
I tried to put the code into the BeforePost event of the master dataset,
but i seem to get problems when there are multiple inserted/updated records pending
for one of the detail datasets that i want to check for duplicate entries
in fields with unique indexes...
I hope to be able to handle updates/deletes/cancels of all 4 datasets
with just 1 ToracleNavigator that is linked to the master dataset.
Can this work as a result of the master/detail relation of the datasets?
How can i get the Navigator to enable the Post/Cancel buttons if the User
did only change/add one of the detail datasets?
I read some posts in the google groups about cachedupdates and master/detail relations
and many of them state that there are problems with the built-in behaviour of Delphi (BDE-)components
(Tquery,TTable) in this situation and that one should rather handle the master/detail processing manually
when using cachedupdates...now i'm a bit confused...Would you recommend this for Toracledataset too
or is there a fundamental difference in the behaviour of the DOA components regarding cachedupdates and master/detail relations?
You see, on one hand i'm trying to figure out how to generally design a master/detail forms that handles cached updates
for Delphi client/server and i know well that it's not your job to teach me this in the first place,
but on the other hand, as most of the information you can find on the net deals with the standard BDE components,
i would be glad if you could spare some light on what issues might be similar with Toracledataset
or which ones of the known BDE - problems concerning this topic i might just forget working with DOAD.
Thanks in advance
Martin
I have an application (D5, Oracle 10.1.0.2.0, DOAD 4.0.7.1)
that acesses 4 tables which are related as follows:
1. articles: master table
2. remarks: detail table (exactly 1 record for each record of articles)
3. shipping: detail table (at least 1, possibly more records for each record of articles)
4. surcharge: detail table (possibly 1 or more records for each record of articles)
There's 1 Toracledataset for each of the tables all using the same OracleSession.
I have set the master property of the 3 detail datasets to the master dataset.
Now here's my questions:
In the Helpfiles (about TOracleSession.ApplyUpdates) there is stated that
in a master/detail relation each dataset must have its CachedUpdates property set to True
in order to have the updates in all detail datasets automatically applied along with the master dataset...
However, i don't want the user to be able to apply more than one master record at a time.
Also one of the detail datasets should be limited to have exactly 1 record for each master dataset.
How can i achieve this?
How do i have to invoke TOracleSession.ApplyUpdates?
like: OracleSession.ApplyUpdates([dsmaster,dsdetail1,dsdetail2,dsdetail3])
or does: OracleSession.ApplyUpdates([dsmaster]) do the trick?
Where should i best check for valid entries before applying/commiting changes?
I tried to put the code into the BeforePost event of the master dataset,
but i seem to get problems when there are multiple inserted/updated records pending
for one of the detail datasets that i want to check for duplicate entries
in fields with unique indexes...
I hope to be able to handle updates/deletes/cancels of all 4 datasets
with just 1 ToracleNavigator that is linked to the master dataset.
Can this work as a result of the master/detail relation of the datasets?
How can i get the Navigator to enable the Post/Cancel buttons if the User
did only change/add one of the detail datasets?
I read some posts in the google groups about cachedupdates and master/detail relations
and many of them state that there are problems with the built-in behaviour of Delphi (BDE-)components
(Tquery,TTable) in this situation and that one should rather handle the master/detail processing manually
when using cachedupdates...now i'm a bit confused...Would you recommend this for Toracledataset too
or is there a fundamental difference in the behaviour of the DOA components regarding cachedupdates and master/detail relations?
You see, on one hand i'm trying to figure out how to generally design a master/detail forms that handles cached updates
for Delphi client/server and i know well that it's not your job to teach me this in the first place,
but on the other hand, as most of the information you can find on the net deals with the standard BDE components,
i would be glad if you could spare some light on what issues might be similar with Toracledataset
or which ones of the known BDE - problems concerning this topic i might just forget working with DOAD.
Thanks in advance
Martin