DB2 10.5 for Linux, UNIX, and Windows

DB2Command.Transaction Property

Gets or sets the DB2Transaction within which the DB2Command executes.

Namespace:
IBM.Data.DB2
Assembly:
IBM.Data.DB2 (in IBM.Data.DB2.dll)

Syntax

[Visual Basic]
Public Property Transaction As DB2Transaction

[C#]
public DB2Transaction
 Transaction {get; set;}
[C++]
public: __property DB2Transaction
* get_Transaction();
public: __property void set_Transaction(DB2Transaction
*);
[JScript]
public function get Transaction() : DB2Transaction
;
public function set Transaction(DB2Transaction
);

Property value

A DB2®Transaction . The default is a null value.

Remarks

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 a DB2Transaction object that is not connected to the same DB2Connection as the DB2Command object, an exception will be thrown the next time you attempt to execute a statement.