MySQL无法连接到数据源中的视图 [英] MySQL cant connect to Views in DataSource

查看:159
本文介绍了MySQL无法连接到数据源中的视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以连接到我的MySQL数据库,并可以很好地导入所有表,但是似乎看不到列表中的任何视图,因此能够导入它们.

任何帮助都会得到赞赏.

感谢 

解决方案

我不确定这是否完全符合您的情况,但是如果我愿意这么做的话.我猜想这将与SQL Server的工作方式类似.

为了使LightSwitch能够识别视图,必须包含主键.

因此,如果您的视图来自一个表,则将主键添加到视图的输出列中.

如果它来自多个表,请在视图中包括每个表的键字段.

我敢肯定,我们的专家可以提供更好的解释,但是解决方案可能在于您如何在视图定义中使用主键.


Hi

I can connect to my MySQL DB ok and import all the tables fine, but I cant seem to see any of my Views in the list and therefore am able to import them.

Any help would be appreciated.

Thanks 

解决方案

I'm not sure this is exactly your situation, but if I might take a stab at this.  I'm guessing that this will work similarly to how SQL Server works.

In order for LightSwitch to recognize views, there has to be primary key's included.

So, if your view is from one table, add the primary key to the output columns of the view.

If it is from multiple tables, include the key field for each table included in the view.

I'm sure there is a better explanation from our experts hanging out here, but the solution probably lies in how you use the primary keys in the view definition.


这篇关于MySQL无法连接到数据源中的视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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