for RuBoard



Can I enlist multiple command operations in the same transaction?


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.


What happens to my transaction if the server crashes while it is processing?


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.


What if I do not explicitly call the Commit() method to save the transaction?


If you do not call the Commit() method, the database changes made during the life of the transaction will not be saved.


Are changes to database schema performed while in a transaction rolled back as well?


Yes. If you were to create a table while participating in a transaction, and then decided to roll the transaction back, the table would be rolled back as well.

for RuBoard

Sams Teach Yourself ADO. NET in 24 Hours
Sams Teach Yourself ADO.NET in 24 Hours
ISBN: 0672323834
EAN: 2147483647
Year: 2002
Pages: 237 © 2008-2017.
If you may any questions please contact us: