Friday, 15 January 2010

Transaction handling

Short post today: I need to sort out the transaction handling on this form. It currently commits the posted record and then goes on to insert/post records into other tables, committing at each stage. There is a rather amusing comment/rant by someone who had already spotted this:

// This is WRONG! The whole transaction should commit or rollback as a whole (i.e ATOMIC).
// What this will do is commit the [main record], but if we have any error
// inserting the data in [additional records] below that data will not be committed.
// There is too much risk of breaking something related at the moment, but this should
// be fixed or it will come back and bite you.


Absolutely! So it looks like it has fallen on me to sort this out... nice :)

No comments:

Post a Comment