|Subject||Re: [IBO] Another Simple question|
> I need to start a new transaction every iteration of the loop, as there areThat would be nice, but it can't happen.
> other posts taking place. I want either all or none to be committed.
I have a similar problem, I want to process an order - with
several line items - and be able to roll back a line if it
can't be completed, or roll back the whole order if there
are too many problems.
I use a transaction for each line, but then if I want to
abandon an order later I have to manually undo the previous
lines one by one.
In your case, add a flag for 'ADDING', commit each line (
slower but safe ), and then you can process each record in a
transaction. If you decide to abandon the add, DELETE WHERE
ADDING = 'X', otherwise just update ADDING ready for the
L.S.Caine Electronic Services