When using multiple QRY and TBL components on a Fom I wonder how I can control commit/rollback. I created a wizard using a pagecontrol and want to be able to commit/rollback all updates/inserts in the last page but I donot understand how I can see if anything has been updated and/or inserted. I look at the 'modified' property but I believe if I do a Post in an earlier page the rollback seems to be ignored.
Is there an example available or can someone explain this? (Do I have to use cachedUpdates???
Thanks,
Hans
how to control commit/rollback
-
- Posts: 451
- Joined: Wed 19 Jan 2005 09:59
Thank you all for your replies! It is very nice to get some support of others.
I believe I understand the transaction mechanism now. I think I have to write some code to find out if something has changed in order to ask the user if he/she wants to save changes. It seems that the DataSet->modified flag refers to the active record only. Since I am using multiple DataSets and the user can edit multiple records, I believe I have to create my own modified flag per DataSet which tells me if one ore more records in a DataSet has been changed.
i.e. if you change a record in a grid a post is done after you TAB the last field. Than the next record is selected and the modified flag says nothing has been changed, since it only applies to the current record. I will have to do some administration using OnPost and OnCancel.
I believe I understand the transaction mechanism now. I think I have to write some code to find out if something has changed in order to ask the user if he/she wants to save changes. It seems that the DataSet->modified flag refers to the active record only. Since I am using multiple DataSets and the user can edit multiple records, I believe I have to create my own modified flag per DataSet which tells me if one ore more records in a DataSet has been changed.
i.e. if you change a record in a grid a post is done after you TAB the last field. Than the next record is selected and the modified flag says nothing has been changed, since it only applies to the current record. I will have to do some administration using OnPost and OnCancel.