Lightswitch does not allow adding or modifying records in MySQL

天涯浪子 提交于 2019-11-30 20:48:10

问题


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 MySQL: "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?


回答1:


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



来源:https://stackoverflow.com/questions/7402946/lightswitch-does-not-allow-adding-or-modifying-records-in-mysql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!