Subject | Re: [IBO] Transaction within transaction |
---|---|
Author | kj01135 |
Post date | 2002-11-05T10:17:32Z |
--- In IBObjects@y..., "Jason Wharton" <jwharton@i...> wrote:
A user just inserted ten rows of data in a dbgrid. He can rollback
all these ten rows without problems (within a transaction control).
Without committing first, he also edited some rows of data and now
he wants to rollback to the point where no editing has occured. If
he click the Rollback button, all the ten records will disappear
because the insertion has'nt been committed. The Cancel button
doesn't work since it only affect to single row of data.
How can I do these interactively? Can it be done using SP? Do I need
to use Cache Update as suggested by Paul Hope?
Thanks for helping me.
Kenneth
> Write a stored procedure that does everything you want the sub-unit of work
> to do. If the stored procedure fails at any point with anexception then all
> that the stored procedure did will be cancelled. If it issuccessful then it
> is part of the transaction and still subject to rollback.Hmm.., let me explain a bit more.
A user just inserted ten rows of data in a dbgrid. He can rollback
all these ten rows without problems (within a transaction control).
Without committing first, he also edited some rows of data and now
he wants to rollback to the point where no editing has occured. If
he click the Rollback button, all the ten records will disappear
because the insertion has'nt been committed. The Cancel button
doesn't work since it only affect to single row of data.
How can I do these interactively? Can it be done using SP? Do I need
to use Cache Update as suggested by Paul Hope?
Thanks for helping me.
Kenneth