我有一个现有的MySQL数据库模型。我在数据库中添加了一个新表,现在我想更新模型。
但是当我在Model浏览器中右击并选择“从数据库更新模型”时.我收到以下信息:
An exception of type 'Microsoft.VSDesigner.Data.Local.ConnectionStringConverterServiceException' occurred while attempting to update from the database. The exception message is: ''.应用程序与现有模型工作得很好。我的意思是,数据可以在需要的时候被成功地获取。
什么可能导致更新模型的问题?是因为特快专递版吗?我如何解决这个问题?
更新:
<connectionStrings>
<add name="OtherDbDataContext" connectionString="metadata=res://*/DataAccess.EF.OtherDb.csdl|res://*/DataAccess.EF.OtherDb.ssdl|res://*/DataAccess.EF.OtherDb.msl;provider=MySql.Data.MySqlClient;provider connection string="User Id=id;Password=password;Host=localhost;Database=otherdb;Pooling=true;Min Pool Size=0;Max Pool Size=100;Connection Lifetime=0;Persist Security Info=True"" providerName="System.Data.EntityClient" />
<add name="DbDataContext" connectionString="server=localhost;User Id=id;password=password;Persist Security Info=True;database=db" providerName="MySql.Data.MySqlClient" />
<add name="DbDataConnectionString" connectionString="server=localhost;User Id=id;password=password;Persist Security Info=True;database=db" providerName="MySql.Data.MySqlClient" />
</connectionStrings>发布于 2011-12-29 14:14:48
我认为问题在于mysql的连接器/网并不完全支持快速版本。看看这篇文章:Mysql - Visual Web Developer - Entity Framework
发布于 2012-07-04 08:22:44
通过删除配置文件中的所有连接字符串解决了这个问题。之后,当您更新模型时,它会提示您添加连接字符串,并且一切都正常工作。
希望能帮上忙。
发布于 2012-09-14 10:34:43
我在这方面的问题与Event Log的完整有关。删除事件日志条目,这解决了问题。希望它能帮到别人。
https://stackoverflow.com/questions/8656990
复制相似问题