This is how we got transactions to work using ADO.NET 2.0 (VB.NET) with Oracle:
'''''''''''''''''''''''''''''''''''''''''''''''''''
'Defined outside of the class
Imports VB = Microsoft.VisualBasic
Imports System.Data.OracleClient
'Friend Class frmYourForm
' Inherits System.Windows.Forms.Form
'cnGlobal is a previously defined ADO.NET connection that is OPEN
1: Dim oraTrans As OracleTransaction
2: oraTrans = cnGlobal.BeginTransaction()
'define the command object we use
3: Dim cmd1 As New OracleCommand
4: cmd1.Connection = cnGlobal
5: cmd1.Transaction = oraTrans
6: sSQL = "delete from tbl_YourTable"
'asssign the command object the SQL statement and execute the SQL
7: cmd1.CommandText = sSQL
8: cmd1.ExecuteNonQuery()
9: oraTrans.Commit()
'Best Regards,
'Tim
'''''''''''''''''''''''''''''''''''''''''''''''''''
'Defined outside of the class
Imports VB = Microsoft.VisualBasic
Imports System.Data.OracleClient
'Friend Class frmYourForm
' Inherits System.Windows.Forms.Form
'cnGlobal is a previously defined ADO.NET connection that is OPEN
1: Dim oraTrans As OracleTransaction
2: oraTrans = cnGlobal.BeginTransaction()
'define the command object we use
3: Dim cmd1 As New OracleCommand
4: cmd1.Connection = cnGlobal
5: cmd1.Transaction = oraTrans
6: sSQL = "delete from tbl_YourTable"
'asssign the command object the SQL statement and execute the SQL
7: cmd1.CommandText = sSQL
8: cmd1.ExecuteNonQuery()
9: oraTrans.Commit()
'Best Regards,
'Tim