|
-
Jun 29th, 2004, 03:12 AM
#1
Thread Starter
New Member
SQLTransaction Question...
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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|