“命令执行期间遇到的致命错误”当试图添加一个视图从MySQL DB [英] "fatal error encountered during command execution" when trying to add a view from MySQL DB

查看:233
本文介绍了“命令执行期间遇到的致命错误”当试图添加一个视图从MySQL DB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从MySQL数据库添加一些表和视图到VS2005中的项目。经过很多环视之后,我终止了使用ADO.NET连接器,这是非常正常的,除非当试图添加一个视图与数据源配置向导,其中我得到命令执行期间遇到的致命错误错误消息,当我尝试用查询生成器添加一个,它不显示在图表窗格中的列的名称。
如果我手动添加所有的SELECT命令,它的工作方式像一个魅力。

I'm trying to add some tables and views from a MySQL database to a project in VS2005. After a lot of looking around I ended using the ADO.NET connector, which works pretty fine, except when trying to add a View with the Data source configuration wizard, where I get the "fatal error encountered during command execution" error message, and when I try adding one with the query builder, where it doesn't show me the name of the columns at the diagram pane. If I add all the SELECT commands by hand, it works like a charm. Any ideas on what might be causing this and how to fix it?

推荐答案

看起来像是使用变量


要修复此问题,请在连接
字符串中添加allow user
variables = true。在这种模式下,它不会
抱怨当它看到@data,但
没有找到该名称的参数。

To fix this add 'allow user variables=true' to your connection string. In this mode it will not complain when it sees @data but doesn't find a parameter of that name.

http://bugs.mysql.com/bug.php?id= 40765

这篇关于“命令执行期间遇到的致命错误”当试图添加一个视图从MySQL DB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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