|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Sharing a Database connectionI have multiple web services with each one updating a different table in
a database. A transaction may require that more than one table be updated. This requires calls to more than one web service. What I want to be able to do is roll back any changes to the database if any one of the web services fail and commit the changes if all web services succeed. My first thought is to share a database connection object between each web service involved in the transaction and use the BeginTransaction method of the connection to maintain atomicity. Is this possible? Alternatively, is there another way to accomplish my goal? Cheers, Olivier |
|||||||||||||||||||||||