How can I use an ADO.NET Manual Transaction to remove records across two databases (on same server)?
I came across this:
But would still like to use .NET 1.1 Manual Transaction if possible.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Wow, been a while since I’ve looked at 1.1. An ado.net transaction is associated with a connection so there’s not really a good way to do this in 1 manual transaction. I remember writing my own cross database txn management class where an executing command would basically register with it and I would keep track of the txns myself. Kind of my own TransactionScope or unit of work. I would roll back all of them if something erred or commit all of them at the end if a “complete” method was called.
The method in the article seems better other than it will invoke DTC (which is ok as long as you want that). I don’t think there’s a better way to do this.