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

查看:72
本文介绍了“在命令执行期间遇到致命错误"尝试从 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?

推荐答案

View 好像使用了变量

Looks like View uses variables

要解决此问题,请添加允许用户"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天全站免登陆