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
Cisco Unity Express to Trigger MWI on overlay DN
Can't boot SBS 2008 Standard - CRCDISK.SYS
Create a subnet for IT dept with 5 people
Pass recordset from local sql server to remote sql server using access adp
Protect Store Procedures in SQL 2000 & 2005
Strip out ’s in mySQL query | XML Parsing Error: undefined entity
error installing ajaxcontroltoolkit - 'there was an error loading types or assembly...'
Gigabit Lan only connecting at 10Mbps... Help!
Access - SQL user parameter entry
Can't email more than one invoice from Quickbooks Pro 2006 in Outlook