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
How Do I Remove The File Tab From Ribbon In Access 2010
ASP.Net -- add a ScriptManager and get "Failed to load source for:
http://localhost:63366/pub
Copying the shade of diagram into a table cell
run excel and run the enable auto refresh
Named anchor tags in IE
Speed of Select query is very slow
freezer healing on side
Trying to connect to the server using Microsoft SQL Server Management Studio
XP - can boot into safe mode, but not safe mode with networking. Also can't boot normally
json string