Hello,
I have a problem managing two tables with CachedUpdates=true
The first table holds the main data and the second table contains further details and it is linked to the first via master-detail link.
The user can add/modify/delete data in three steps: in the first step he operates on the records of the first table only; then the application checks if the data is consistent, if so it proposes the user to fill the further details to be saved in the second table. If everything is ok for this data too then the buttons save/cancel are shown.
The user can complete the first step, go to the second and the third and finally click on save or he can decide to go back and forth among the steps if any amendments are necessary before saving.
In order to do so I decided to set CachedUpdates =true, to use ApplyUpdates to validate the steps and play with Savepoint and RollbacktoSavePoint to go back to the previous step. Unfortunately this doesn’t work for me; it seems I can save only one Savepoint per time and in some cases the form shows inconsistent data too.
Is this the right approach to the problem or you can propose a better one ?
Many thanks
Pio Pio
Insert data in steps
Re: Insert data in steps
Hello,
To undo the last operation in the cached updates mode, you can use the RevertRecord method. At every call of this method, all edits of DataSet will be sequentially undone. A sample of RevertRecord work can be found in our demos - the CachedUpdates section.
To undo the last operation in the cached updates mode, you can use the RevertRecord method. At every call of this method, all edits of DataSet will be sequentially undone. A sample of RevertRecord work can be found in our demos - the CachedUpdates section.