Lightswitch不允许在MySQL中添加或修改记录 [英] Lightswitch does not allow adding or modifying records in MySQL

查看:77
本文介绍了Lightswitch不允许在MySQL中添加或修改记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将Microsoft Visual Studio Lightswitch 2011与MySQL一起使用.我遵循了在在这里详细说明了开发人员如何在修改MySQL记录或向MySQL添加记录时如何避免令人讨厌的错误:在提供程序连接上启动事务时发生错误.有关详细信息,请参见内部异常.内部异常消息:不支持嵌套事务. "

但是,在将推荐的代码添加到Lightswitch中的数据源时,该代码位于解决方案的公共"项目中,该项目不允许引用Systems.Transactions参考(因此该代码无法工作).

关于如何解决此问题的任何想法?

解决方案

我只是看着这个,在MSDN论坛(http://social.msdn.microsoft.com/Forums/en-US/lightswitch/thread/e0d1a17b-eb55-4863-a81e-0d56ffbdc0cc).

应用最后一条评论中提到的修补程序可以解决此问题(KB2534087).

http://archive.msdn.microsoft.com/KB2534087

安装需要重新启动,至少对我来说,这花了几分钟才能真正完成.另外,请确保您具有最新的MySQL ADO.NET驱动程序(连接器/NET).

丹尼尔

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?

解决方案

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

这篇关于Lightswitch不允许在MySQL中添加或修改记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆