System.Data.SqlClient.SqlCommand.Transaction Property

Gets or sets the System.Data.SqlClient.SqlTransaction within which the System.Data.SqlClient.SqlCommand executes.


public SqlTransaction Transaction { set; get; }


Documentation for this section has not yet been entered.


You cannot set the SqlCommand.Transaction property if it is already set to a specific value, and the command is in the process of executing. If you set the transaction property to a System.Data.SqlClient.SqlTransaction object that is not connected to the same System.Data.SqlClient.SqlConnection as the System.Data.SqlClient.SqlCommand object, an exception is thrown the next time that you attempt to execute a statement.


Namespace: System.Data.SqlClient
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 1.0.5000.0,