General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
I have an application in which I'm updating several tables and want to wrap then in a tranaction so that if one update fails I can rollback any changes. However when I first wrote the code I did all my updating to each of the tables before I started the Begin Transaction End Transaction and now realize that the rollback will only rollback any transactions within the Begin End Transaction. So instead I have changed the code so that if the tableupdate fails on any of the tables I just do a tablerevert for each of the tables. I have also read that you need to keep to a miniumum what you do within the transaction because it locks the table. What can we consider a reasonible amount of code to put within a transaction. Will I be ok if I leave my code as is with the tablerevert if the tableupdate fails.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only