See Also: SqlTransaction Members
The application creates a System.Data.SqlClient.SqlTransaction object by calling SqlConnection.BeginTransaction on the System.Data.SqlClient.SqlConnection object. All subsequent operations associated with the transaction (for example, committing or aborting the transaction), are performed on the System.Data.SqlClient.SqlTransaction object.
Try/Catch exception handling should always be used when committing or rolling back a System.Data.SqlClient.SqlTransaction. Both SqlTransaction.Commit and SqlTransaction.Rollback generate an InvalidOperationException if the connection is terminated or if the transaction has already been rolled back on the server.