首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

C#访问Mysql数据库有关问题 出现错误。{"Fatal error encountered during command execution.&q

2013-11-09 
C#访问Mysql数据库问题 出现异常。{Fatal error encountered during command execution.}1,查询分析器可

C#访问Mysql数据库问题 出现异常。{"Fatal error encountered during command execution."}
1,查询分析器可以正常执行SQL
2,C#程序调用,出现异常。{"Fatal error encountered during command execution."}
3,有变量的SQL语句块,就会出现以上错误。

C#访问Mysql数据库有关问题 出现错误。{"Fatal error encountered during command execution."}

请各位帮看看! mysql c# 异常
[解决办法]
你执行的事strSql4,返回一个数据集(select)。你最后执行的是ExecuteNonQuery()方法,应该是ExecuteQuery()吧?
[解决办法]
你没定义@id变量? mysql不熟,sql server要declare
  
*****************************************************************************
签名档: http://feiyun0112.cnblogs.com/
[解决办法]
@ 改成 ?
[解决办法]
用string.Format()来写那个sql语句试试

热点排行