I am using Microsoft Visual Studio Lightswitch 2011 with MySQL. I followed the advice provided in a previous Stack Overflow post found here that details how developers can get around a pesky error when modifying or adding a record to MyS开发者_开发知识库QL: "An error occurred while starting a transaction on the provider connection. See the inner exception for details. Inner exception message: Nested transactions are not supported."
However, when adding the recommended code to data sources in Lightswitch, that code resides in the "common" project of the solution, which does not allow references to the Systems.Transactions reference (hence the code cannot work).
Any ideas on how to solve this issue?
I was just looking at this and found the solution on the MSDN forums (http://social.msdn.microsoft.com/Forums/en-US/lightswitch/thread/e0d1a17b-eb55-4863-a81e-0d56ffbdc0cc).
Applying the hotfix mentioned in the last comment solved the problem (KB2534087).
http://archive.msdn.microsoft.com/KB2534087
The installation requires a restart and, at least for me, it took a a few minutes to actually finish. Also, make sure you have a recent MySQL ADO.NET driver (Connector/NET).
Daniel
精彩评论