Subject Re: [IBO] Rollback to a point, not all the changes
Author Jason Wharton
Hi Frank!

> hmm, since this is a Transaction-related command, why not
> implement:
>
> TIB_Transaction.Savepoint('MySavePointName');
>
> and
>
> TIB_Transaction.RollBackTo('MySavePointName'); ?
>
> wouldn't interfere with any existing stuff and would
> be pretty self-explanatory imo. Just raise an exception
> if it's used against a non-FB1.5-server...

Yes, those would be overloaded versions of the same methods that don't have
parameters. (SavePoint would be anyway)

I forgot which version of Delphi allows for overloaded methods. Someone care
to refresh my memory?

I could also name it differently to avoid the problem.

Also, I would need to have a connection characteristic,
savepoints_supported, so people could know if they are writing code generic
to InterBase/Firebird backend's. Because what I would do is raise an
exception if that isn't supported.

PS. Doing a rollback seems quite painful with Firebird 1.5. I wonder if it
is because of extra stuff necessary to implement this feature... I sure hope
not because I surely would rather have smooth rollbacks again and sweep
these savepoints under the rug... I now have to make sure I have a backup
before I do anything that could lead to a large rollback. Its better to
restore than live with a database that has a lot of rolled-back material
left in it.

Jason Wharton
www.ibobjects.com