I am writing an application that writes to two separate SQL Servers so I use two separate SQLConnection objects. Problem is, I would like to use a nested transaction so that if the parent transaction is rolled back then the inner transaction is also rolled back as below:

-----------------------------------------------------------

Declare Connection1
Declare Connection2

Open Connection1

Open Connection2

Begin Transaction For Connection1

Update database for Connection1

Begin Transaction For Connection2

Update database for Connection2

Commit Transaction For Connection2

Rollback Transaction For Connection1 (I want this to rollback the data for Connection1 and Connection2)

-----------------------------------------------------------

Clearly the above does not work due to the transactions being associated with different connection objects. Is there any way this can be achieved in VB.NET?