Cached Updates and Master Detail
Posted: Fri 13 Jan 2012 19:07
I have a simple master detail relation that I would like to manage using cached updates.
I am able to make it work... most of the time.
I did set the detail dataset option to LocalMasterDetail like I found in other posts.
When applying updates, it looks like the order of the datasets have an impact on the results.
When applying updates after inserting a new master the applyupdate should be like :
IBCConnection1.ApplyUpdates([MasterIBCQuery, DetailIBCQuery]);
and when applying updates after deleting the details AND the master it should be like:
IBCConnection1.ApplyUpdates([DetailIBCQuery, MasterIBCQuery]);
Applying update only on the master doesn't propagate to the details, saving only the master (unlike the ClientDataset).
Am I missing something ?
Should it apply the updates in the correct order depending on the type of edit ?
Thanks,
Pascal
Delphi XE
IBDAC 4.1.3
Firebird 2.5.1
I am able to make it work... most of the time.
I did set the detail dataset option to LocalMasterDetail like I found in other posts.
When applying updates, it looks like the order of the datasets have an impact on the results.
When applying updates after inserting a new master the applyupdate should be like :
IBCConnection1.ApplyUpdates([MasterIBCQuery, DetailIBCQuery]);
and when applying updates after deleting the details AND the master it should be like:
IBCConnection1.ApplyUpdates([DetailIBCQuery, MasterIBCQuery]);
Applying update only on the master doesn't propagate to the details, saving only the master (unlike the ClientDataset).
Am I missing something ?
Should it apply the updates in the correct order depending on the type of edit ?
Thanks,
Pascal
Delphi XE
IBDAC 4.1.3
Firebird 2.5.1