Subject Re: [IBO] Rollback to a point, not all the changes
Author Frank Ingermann
Hello Ed,

Ed Dressel wrote:
> I am making sequential changes to a database:
>
> Set A Changes
> Set B Changes
> Set C Changes
>
> if in the middle of making Set C Changes I find that I want to
> rollback, but only to those belonging to set C, I want to keep Set B
> Changes.
>
> Is tehre a way to do this?

depends on what engine you're using - with FB 1.0 and
IB: No; with FB1.5: Yes, using SAVEPOINTs.

With FB1.5 you can do:

<Set A Changes>
SAVEPOINT A;
<Set B Changes>
SAVEPOINT B;
<Set C Changes>
{oops - something went wrong}
ROLLBACK TO B;

More about Savepoints in the FB1.5 release notes:
http://www.ibphoenix.com/downloads/Firebird_v15.106_ReleaseNotes.pdf

hth,
Frank