System.Data Namespace IDbCommand Class
Sets or retrieves the transaction in which the IDbCommand executes.
Script |
IDbCommand.Transaction [ = sqlTransaction ] |
sqlTransaction |
The transaction in which the IDbCommand executes. |
The property is read/write with no default value.
You cannot set the Transaction property if it is already set to a specific value, and the command is in the process of executing. If you set the property to a transaction object that is not within the same connection as the command object, an exception will be thrown the next time you attempt to execute a statement.
IDbCommand Members