.NET Framework 4.6 and 4.5
member Connection : SqlConnection with get, set
The Connection property was changed while the command was enlisted in a transaction..
If the command is enlisted in an existing transaction, and the connection is changed, trying to execute the command will throw an InvalidOperationException.
If the Transaction property is not null and the transaction has already been committed or rolled back, Transaction is set to null.
The following example creates a SqlCommand and sets some of its properties.
No code example is currently available or this language may not be supported.
Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1
.NET Framework Client Profile
Supported in: 4, 3.5 SP1