This documentation is archived and is not being maintained.

OracleTransaction.Dispose Method

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

Releases the unmanaged resources used by the OracleTransaction and optionally releases the managed resources.

[Visual Basic]
Public Overridable Sub Dispose() Implements IDisposable.Dispose
public virtual void Dispose();
public: virtual void Dispose();
public function Dispose();




This method is called by the public Dispose() method and the Finalize method. Dispose() invokes the protected Dispose(Boolean) method with the disposing parameter set to true. Finalize invokes Dispose with disposing set to false.

When the disposing parameter is true, this method releases all resources held by any managed objects that this OracleTransaction references. This method invokes the Dispose() method of each referenced object.

Notes to Inheritors:   Dispose can be called multiple times by other objects. When overriding Dispose(Boolean), be careful not to reference objects that have been previously disposed of in an earlier call to Dispose. For more information about how to implement Dispose(Boolean), see Implementing a Dispose Method.

For more information about Dispose and Finalize, see Cleaning Up Unmanaged Resources and Overriding the Finalize Method.


[Visual Basic, C#, C++] The following example creates an OracleTransaction and then disposes of it.

[Visual Basic] 
Public Sub OracleTransactionHereAndGone()
    Dim myTransaction As OracleTransaction = myConnection.BeginTransaction()
End Sub 'OracleTransactionHereAndGone

public void OracleTransactionHereAndGone()
    OracleTransaction myTransaction = myConnection.BeginTransaction();

    void OracleTransactionHereAndGone()
        OracleTransaction* myTransaction = myConnection->BeginTransaction();

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.


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

.NET Framework Security: 

See Also

OracleTransaction Class | OracleTransaction Members | System.Data.OracleClient Namespace