I have a Sub Routine as below:

Private Sub SaveRecord()
Call InsertIntoTable1
Call InsertIntoTable2
Call InsertIntoTable3
Call InsertIntoTable4
End Sub

I want to use the transaction object in such a way that it starts just before the first Insert Call and ends after the last Insert Call. The situation is that I have to save records in each table using different procedures.

Presently, if suppose records are successfully inserted in First and Second Tables and if insertion fails in Third Table then the entries done in First and Second Table must rollback.

How it can be done?

I have a Sub Routine as below:

Private Sub SaveRecord()
Call InsertIntoTable1
Call InsertIntoTable2
Call InsertIntoTable3
Call InsertIntoTable4
End Sub

I want to use the transaction object in such a way that it starts just before the first Insert Call and ends after the last Insert Call. The situation is that I have to save records in each table using different procedures.

Presently, if suppose records are successfully inserted in First and Second Tables and if insertion fails in Third Table then the entries done in First and Second Table must rollback.

How it can be done?

I am interested in how I can do this as well so listening...