O'Reilly logo

Sams Teach Yourself ADO.NET in 24 Hours by Paul Bertucci, Jason Lefebvre

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Q&A

Q1: Can I enlist multiple command operations in the same transaction?
A1: Certainly! All you need to do is create another Command object and assign it the same Connection object. Then remember to assign the SqlTransaction object to it as well.
Q2:What happens to my transaction if the server crashes while it is processing?
A2: This is dependent upon your data source. However, using Microsoft SQL Server 7.0 or 2000, all changes made during the life of your transaction will be rolled back. Almost any transactional data source should operate in the same manner.
Q3:What if I do not explicitly call the Commit() method to save the transaction?
A3: If you do not call the Commit() method, the database changes made during the life of the transaction ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required