An object representing the new transaction.
This command maps to the ssNoVersion implementation of BEGIN TRANSACTION.
You must explicitly commit or roll back the transaction using the SqlTransaction.Commit or SqlTransaction.Rollback method. To make sure that the dnprdnshort Data Provider for ssNoVersion transaction management model performs correctly, avoid using other transaction management models, such as the one provided by ssNoVersion.
If you do not specify an isolation level, the default isolation level is used. To specify an isolation level with the erload:System.Data.SqlClient.SqlConnection.BeginTransaction method, use the overload that takes the iso parameter (SqlConnection.BeginTransaction(System.Data.IsolationLevel)). The isolation level set for a transaction persists after the transaction is completed and until the connection is closed or disposed. Setting the isolation level to Snapshot in a database where the snapshot isolation level is not enabled does not throw an exception. The transaction will complete using the default isolation level.
If a transaction is started and a level 16 or higher error occurs on the server, the transaction will not be rolled back until the SqlDataReader.Read method is invoked. No exception is thrown on ExecuteReader.
When your query returns a large amount of data and calls BeginTransaction, a System.Data.SqlClient.SqlException is thrown because ssNoVersion does not allow parallel transactions when using MARS. To avoid this problem, always associate a transaction with the command, the connection, or both before any readers are open.
For more information on ssNoVersion transactions, see "Explicit Transactions" and "Coding Efficient Transactions" in ssNoVersion Books Online.