Dim connection As New OleDbConnection(<connection string>)
Dim command1 As New OleDbCommand(<SQL command>, connection)
Dim command2 As New OleDbCommand(<SQL command>, connection)
Dim transaction As OleDbTransaction
Try
connection.Open()
transaction = connection.BeginTransaction()
command1.Transaction = transaction
command2.Transaction = transaction
command1.ExecuteNonQuery()
command2.ExecuteNonQuery()
transaction.Commit()
Catch ex As Exception
If not transaction Is Nothing
transaction.Rollback()
End If
MessaegBox.Show("Data Access Error.")
Finally
connection.Close()
End Try