Fatal error encountered during command execution

Posted 程序人生

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Fatal error encountered during command execution相关的知识,希望对你有一定的参考价值。

mysql + .net + EF 开发环境,调用一处sql语句报错:

Fatal error encountered during command execution
[sql] view plain copy print?
SELECT @r AS cateid,(SELECT @r := b.ParentId FROM cmscontentcategory b WHERE b.id = cateid) AS parentid
FROM (SELECT @r := ‘75422ccd151c484291013d72f9a98cd7‘) vars,cmscontentcategory h
WHERE @r <> ‘sys‘;
查看详细错误:
Parameter ‘@r‘ must be defined
查看国外资料发现一个方法,在mysql数据连接字符串增加Allow User Variables=True

Database=testdb;Data Source=localhost;User Id=root;Password=hello;Allow User Variables=True

ok,搞定。

以上是关于Fatal error encountered during command execution的主要内容,如果未能解决你的问题,请参考以下文章

fatal: HttpRequestException encountered解决方法

记git升级版本之后出现fatal: NullReferenceException encountered问题

VS报错:LINK : fatal error LNK1104: 无法打开文件“msvcp100d.lib”

解决ERROR: D:Snortetcsnort.conf(511) Unknown preprocessor: "sip". Fatal Error, Quitting..(示例

LINK : fatal error LNK1104: cannot open file 'mfcs42d.lib'

fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC sha