0

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?

2
Contributors
1
Reply
2
Views
10 Years
Discussion Span
Last Post by MattWilkinson
0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.