Update
Posted by: Dan B.
Date: August 01, 2006 08:44AM

Just an update,

I was never able to get the .net transactionscopes to work. From the following article

http://blogs.msdn.com/angelsb/archive/2004/07/07/175586.aspx

My understanding was that when you bracket code inside of a transaction scope, any connections that are instantiated within the scope would automatically detect that there was a transaction scope around it, and would then automatically register and enlist itself within the transaction.

This never happened, and was unable to find any resources to explain why. I ended up implementing the transactions the old way and associating the connections to the transactions manually.

Something along the lines of :

MySqlConnection mySqlConnection = new MySqlConnectionConfigurationManager.AppSettings["DATABASECONNECTIONSTRING"]);
mySqlConnection.Open();
MySqlTransaction trans = conn.BeginTransaction();

// do work with the connection

// trans.commit or trans.rollback

mySqlConnection.Close();



The only answer I have is that perhaps there the mysql connector that I was using did not support this behavior. Eventually, I would like to test with SQLserver, to see if I can get it to work there.

Options: ReplyQuote


Subject
Written By
Posted
July 18, 2006 12:57PM
July 25, 2006 07:09AM
Update
August 01, 2006 08:44AM
August 06, 2006 10:08AM
August 07, 2006 11:35PM
September 20, 2006 11:29AM
September 26, 2006 08:02AM
September 28, 2006 06:51PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.