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的更多相关文章

  1. MYSQL报Fatal error encountered during command execution.错误的解决方法

    {MySql.Data.MySqlClient.MySqlException (0x80004005): Fatal error encountered during command executio ...

  2. My SQL和LINQ 实现ROW_NUMBER() OVER以及Fatal error encountered during command execution

    Oracle 和SQL server都有ROW_NUMBER() OVER这个功能函数,主要用于分组排序,而MySQL 却没有 SELECT * FROM (SELECT ROW_NUMBER() O ...

  3. mysql解决Fatal error encountered during command execution. 500内部错误

    Asp.net 连接mysql 会出现Fatal error encountered during command execution.的错误 解决办法如下: 连接字符串添加  Allow User ...

  4. mysql报Fatal error encountered during command execution的解决办法

    连接字符串里加上 Allow User Variables=True 解决. 否则时不时的报错,存储过程名长一点也报错,又有时报有时不报,参数传1位数就正常2位数就报错等…… 折腾mysql蛋疼啊

  5. mysql Fatal error encountered during command execution

    由于在操作中使用了自定义参数. 所以得在连接字符串中加上Allow User Variables=True: 表示允许用户自定义参数.

  6. Fatal error: Maximum execution time of 30 seconds exceeded in

    Fatal error: Maximum execution time of 30 seconds exceeded in C:\Program Files\Apache Software Found ...

  7. pydensecrf安装报错1、UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 29: invalid start byte2、 LINK : fatal error LNK1158: 无法运行“rc.exe” error: command 'D:\\software\\vs2015\\VC\\BIN

    pydensecrf安装报错 1.UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 29: invalid st ...

  8. phpMyAdmin出现Fatal error: Maximum execution time of 300 seconds

    在mysql用phpMyAdmin导入大数据的时候出现:Fatal error: Maximum execution time of 300 seconds exceeded in D:/查了很多文章 ...

  9. PHP超时提示Fatal error: Maximum execution time of 30,解决方案

    PHP执行超时提示如下:Fatal error: Maximum execution time of 30 seconds exceeded in D:\php\AppServ\www\sum3\te ...

随机推荐

  1. 重大变革即将来临 5G CPE会替代光纤入户吗?

    导读 从国内的新闻报道上我们可以看到,从2018年下半年开始各大重要活动.春晚直播等,都宣布已经使用5G网络.既然支持5G网络的终端都还没有正式上市,那么5G网络是如何使用的呢?答案是5G CPE设备 ...

  2. Vue 2.6版本基础知识概要(一)

    挂载组件 //将 App组件挂载到div#app节点里 new Vue({ render: h => h(App), }).$mount('#app') VueComponent.$mount ...

  3. Photoshop实例视频教程

    Photoshop实例视频教程 2019/04/23 文件名 大小 复古街机风建筑效果图PS教程.mp4 6.63 MB 48.PS教程从零开始学——切片选择工具.mp4 20.90 MB PS教程- ...

  4. Django后端向前端直接传html语言防止转义的方法(2种)

    Django后端向前端直接传html语言防止转义的方法(2种) 目的,为了让前端对后端传输的这种方式不转义 1.使用mark_safe() from django.utils.safestring i ...

  5. 一、commander

    #!/usr/bin/env node const program = require('commander'); const colors = require('colors'); const pk ...

  6. PHP用户输入数据进行过滤

    1.在表单中,input项,如果用户输入的是英文状态下的双引号或单引号,数据保存后.以后又在后台编辑的时候,<input value=" "这是带引号的值,因为引号导致问题& ...

  7. eclipse中查看字节码

    1:在线安装ByteCode插件 打开Eclipse Go to"Help -> Install new Software... -> Work with:"中选择By ...

  8. 重写Sink合并多行

    flume1.6+elasticsearch6.3.2 Pom <dependencies> <dependency> <groupId>junit</gro ...

  9. filebeat-6.4.3-windows-x86_64输出Kafka

    配置filebeat.yml文件 filebeat.prospectors: - type: log encoding: utf- enabled: true paths: - e:\log.log ...

  10. webview 更新方法细节

    plus.webview.getWebviewById("user.home").evalJS("getHomeData()");//调用页面方法 plus.w ...