Gets or sets the OdbcTransaction within which the OdbcCommand executes.
[Visual Basic] Public Property Transaction As OdbcTransaction [C#] public OdbcTransaction Transaction {get; set;} [C++] public: __property OdbcTransaction* get_Transaction(); public: __property void set_Transaction(OdbcTransaction*); [JScript] public function get Transaction() : OdbcTransaction; public function set Transaction(OdbcTransaction);
An OdbcTransaction. The default is a null 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 transaction property to an OdbcTransaction object that is not connected to the same OdbcConnection as the OdbcCommand object, an exception will be thrown the next time you attempt to execute a statement.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
OdbcCommand Class | OdbcCommand Members | System.Data.Odbc Namespace