Export (0) Print
Expand All

OdbcCommand.Transaction Property

Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.

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);

Property Value

An OdbcTransaction. 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 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.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

OdbcCommand Class | OdbcCommand Members | System.Data.Odbc Namespace

Show:
© 2014 Microsoft