Microsoft
Software
Hardware
Network
Question : TransactionScope - Sample Code
Hello Experts,
I have a need for a transaction, that will be able to span different tables on different databases. This led me to the TransactionScope class. From what I've read online, this should be able to get 'er done. But from the code samples I've found, I haven't been able to implement it. Can someone post a working sample code for this? Nothing complex, just the ability to insert a line into two tables on two different servers, and commit the transaction.
Psuedo Code:
'Start TransactionScope
'Do insert 1 for a table on Database Server 1
'Do insert 2 for a different table on Database Server 2
'Catch any errors
'Commit if successful - Rollback if failed
'End TransactionScope
Thanks!
Maurice
Answer : TransactionScope - Sample Code
Ive never really used TransactionScope. You could use 2 sepereate transaction and just roll them both back
Random Solutions
Switch 3Com 4800G doesn't save configuration ?
How can I destroy all data on this old server?
Exchange 2007 - Error 5.1.0 - Unknown address error 550-'5.1.1 User unknown'
Put control inside of AJAX UpdatePanel, now get Type 'System.Web.UI.UpdatePanel
' does not have a public property named 'FileUpload'
How to pause a process execution in C++
A Web Exception occurred because an HTTP 401 - Unauthorized response was received from Unknown
In Latex, how do I change the format of automatic equation numbering?
PHP, ASP, Moneris
Oracle Error "To many precesion Specifiers"
Stringtopostnet function not working in Crystal viewer 2008 ---