我正试图通过WCF服务从Lightswitch连接到现有的MySQL DB。
我做了以下工作:
这是可行的,数据库将正确地显示出来。
然后,我按照教程这里使用创建WCF服务:
metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl;provider=MySql.Data.MySqlClient;provider connection string="server=10.192.xx.yy;User Id=xxxxxxx;database=projet;password=xxxxxxxxxx;Persist Security Info=True"。这是正确的。实体关系图显示包含所有字段的数据库的三个选定表。
然后,我将WCF RIA服务连接到lightswitch,遵循本教程这里。
<add name="b70821ef-..." connectionString="metadata=res:///Model.csdl|res:///Model.ssdl|res://*/Model.msl;provider=MySql.Data.MySqlClient;provider connection string="server=10.192.xx.yy;User Id=xxxxxxx;database=projet;password=xxxxxxx;Persist Security Info=True"" providerName="System.Data.EntityClient"/>解决方案可以在没有错误的情况下构建。但是,在运行Lightswitch应用程序时,MySQL表的详细信息屏幕只显示一个红线,表明它无法加载数据。
我怀疑粘贴到web.config的连接字符串是错误的。
以上方法中有什么错误/缺失,或者我如何隔离和调试问题?
发布于 2011-08-24 13:01:21
跟着这个帖子。http://lightswitchhelpwebsite.com/Forum/tabid/63/aft/89/Default.aspx
对我来说,这是一个解决方案->请参阅关于coonection配置的最后一点
问候
https://stackoverflow.com/questions/6982624
复制相似问题