Undoing Child Transactions? IV2008

Undoing Child Transactions? IV2008

rschader
Advocate Advocate
271 Views
1 Reply
Message 1 of 2

Undoing Child Transactions? IV2008

rschader
Advocate
Advocate
Working on an addin that presents a form to the user and allows multiple selections for changing items, at one point I added a button to "Undo Last" which I had working fine at one point.

I decided at a later time that I would like to add a "Cancel" button that would dismiss the form AND undo ALL the changes made during the form's "session". At first I thought I could just set a CheckPoint using the transaction manager, but that threw an exception until I added code to start a "main" transaction. Once I did that, that portion using the Checkpoint worked and I was able to undo the whole session now, BUT...

then when I went to test the "Undo Last" button, that threw an exception, so I decided to add (Start/End) my own child transactions hoping that would allow me to undo those separately while also still giving me the option to completely undo the main parent transaction. But it still throws an exception!

So I am wondering, is this child transaction have the capability to undo single portions, or should I look instead at setting multiple Checkpoints to go back to (if that is possible?)

Bob
0 Likes
272 Views
1 Reply
Reply (1)
Message 2 of 2

rschader
Advocate
Advocate
I would like to report I was able to achieve my objective using multiple checkpoints. Only issue now is that the results of the GotoCheckPoint() call do not update the graphics window until I nudge my spaceball. But that is probably a simple view update call I can add.
0 Likes