I found this great article on Transactions with Table Adapters. However, this article doesn’t explain why Transactions are needed or even desirable!
Why would it be worth me trying to implement Transactions alongside my TableAdapters?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Suppose that something bad happens when you are in the middle of saving something that takes more than one query to the database. What do you want to happen to all data that has already been saved when you began the save operation?
Most of the developers want to invalidate the data that has been saved previously.
Well.. that’s what transactions are for: you encapsulate all the save logic in a transaction so that if/when something bad happens in the middle, nothing is saved.
More on the Transactions subject: http://en.wikipedia.org/wiki/Database_transaction