master/detail cachedupdates

master/detail cachedupdates

Post by horstborsc » Thu, 29 Jun 2006 20:54:06

Hi all,
I'm trying to develop a Delphi 5 application
that accesses an oracle Database ( via DOAD components
(Version by Allround Automations).
These are the underlying tables in the database
and the corresponding components of the application:

1. table orders (master),
TOracleDataSet dsOrders
+ Tdatasource and a couple of dbedits to display the fields
2. table order_remarks (detail),
TOracleDataSet dsOrderRems(Master property=dsOrders)
+ Tdatasource and a couple of dbedits to display the fields
3. table positions (detail),
TOracleDataSet dsPositions(Master property=dsOrders)
+ Tdatasource and a dbgrid to display the detail fields
4. table gifts (detail),
TOracleDataSet dsGifts(Master property=dsOrders)
+ Tdatasource and another dbgrid to display the detail fields

(TOracleDataSet is derived from TDataSet)
There is 1 DBNavigator linked to the master dataset that should
handle updates/deletes/cancels of all 4 datasets (i assumed this to
as a result of the master/detail relation of the datasets).

For each record in the orders table(master) there should be
exactly 1 record in the order_remarks table
and at least 1 (possilby more) record(s) in the positions table
plus possibly one or more record(s) in the gifts table.

basically what i want to do is to have the user insert/update one
complete order
with all its details and force him to save or cancel the updates before
the current (or inserting a new) master dataset.
Before applying the updates to the database i want to check for valid
in all fields and in case of errors or missing values abort the
complete transaction.
(i.e. if one of the detail datasets still has errors, nothing should be
to the database,but the current record should remain in the Form to
allow the user
to make corrections.)
My problem is that i am not really sure if and how to use cachedupdates
for this.
about cachedupdates and master/detail relations...
But as i am relatively new to Delphi i am a bit puzzled about if all
this applies
to my situation...
My Questions:
- do i have to use cachedupdates at all for this and if so,
for which one of the datasets?
(Note that i don't want the user to be able to apply more than one
master record
in one transaction)
- where/how should i perform the checks for valid entries?

Also it would be great if anyboby could point me to an example/tutorial

of how to generally design master/detail forms that handle cached
for Delphi client/server.

Thanks in advance

1. Master Detail entering new Master + new Detail(s)???

2. Master/Detail DVWP: New Master search still shows old Detail

Hello -

I created a pretty simple master/detail setup with two data views going
against a SQL database. Master DVWP uses a search box to filter the
results, and then clicking each item in the Master filtered list shows
the Detail below.

However, here's my problem:

1) Load up web page, empty search (no Master list since there is no
filter, no Detail shown).
2) Enter search string and do postpack, Master lists A and B. Detail
shows A, as it defaults to show the first row.
3) Click "B". Master shows B as selected, Detail shows B.
4) Enter new Master search, do postback, Master lists C and D. Detail
still shows B.

#4 should have Detail shows C, being the first row in the list. But
somehow that doesn't get passed to the Detail after changing the Master

If I skip step #3, and never choose an item to display in the detail
and always just have it default to the first row, then #4 works as
expected. It's only when I manually trigger the web part connection.

So my question is how to clear that parameter so that when I re-filter
the Master it goes back to passing the first row value to the Detail?
Is there another parameter or call that needs to happen during the
Master filtering?

Thanks for any help. This one has me stumped.


3. Master-detail: why doesn't detail DS automatically track row of master (i.e. :param not updated)?

4. Master Detail Report With Master Chart and Detail Table

5. Concatenation of detail-records in a Master-Detail relationship

6. How to: Display Details in Master-Detail DataGrid/DataList without Postback

7. Repost: VB Master-Details Edit (Separate Pages), Response Redirect to Master Page Databinding Help...

8. Master-Detail (2 details)

9. Master detail problem with more then one detail table

10. Master-Detail section with detail on another view

11. Master Detail Error: "The master that you picked is in an inc

12. How can I do a Master/detail with navigation in detail page ?

13. data binding: Master-detail-detail

14. VB Master-Details Edit (Separate Pages), Response Redirect to Master Page Databinding Issue...

15. Master-Detail DataGrid with conditional (detail) formatting