Subject | RE: [firebird-support] Use a row only once |
---|---|
Author | Markus Ostenried |
Post date | 2004-11-24T17:13:37Z |
At 08:45 Wednesday, 24.11.2004 -0500, Chad Z. Hower wrote:
your "bigger transaction". I don't know if this works but couldn't you
create a savepoint just before your step "1" and in the case of failure
only rollback to this point? This way you would not need to redo all the
work of the bigger transaction. Note that I don't know if an exception will
cause the whole transaction to be rolled back or just to the last savepoint.
Please excuse my ignorance, I just had a headache with pictures - an idea -
and thought it might be of help.
I hope that someone with more insight can comment on this.
FWIW,
Markus
>But the problem is bigger. I could wrap 1+2 in a transaction. BUT theActually I've never used SAVEPOINTs but maybe they can help you grouping
>problem is they are part of a bigger transaction. So now I have to break
>this one out and program in my own transaction handling if this one fails
>for another reason, or somehow isolate this one otherwise. If I put this in
>its own, and it commits, but then the bigger one fails, now I have to
>manully rollback this one... And vice versa..
your "bigger transaction". I don't know if this works but couldn't you
create a savepoint just before your step "1" and in the case of failure
only rollback to this point? This way you would not need to redo all the
work of the bigger transaction. Note that I don't know if an exception will
cause the whole transaction to be rolled back or just to the last savepoint.
Please excuse my ignorance, I just had a headache with pictures - an idea -
and thought it might be of help.
I hope that someone with more insight can comment on this.
FWIW,
Markus