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 can you search e-mail within Outlook 2010 and not use the index?
Installing SSL certifcate on exchange 2010
Canon iR 2200 set IP adrress
How do I allow only a certain ip adress to access my website?
How Can I Trace Email Routing Failure?
Cannot access Windows 2008 DFS links from Windows 2003
BES Express vs Exchange ActiveSync
Airport Code with reverse geo coding with google maps api
delete orphaned offline files
Need a script to create user folders with three nested folders and set appropriate security for each