There is already an open DataReader associated with this Command which must be closed first
通常出现在嵌套查询数据库(比如在一个qry的遍历时,又进行了数据库查询)
通过在连接字符串中允许MARS可以轻松解决这个问题。 将MultipleActiveResultSets = true添加到连接字符串的提供程序部分
"SqlServerConnection": "Server=.\\sqlexpress;Database=test;Integrated Security=True;Connect Timeout=15;MultipleActiveResultSets=true",
There is already an open DataReader associated with this Command which must be closed first的更多相关文章
- There is already an open DataReader associated with this Command which must be closed first." exception in Entity Framework
Fixing the "There is already an open DataReader associated with this Command which must be clos ...
- 在实体对象中访问导航属性里的属性值出现异常“There is already an open DataReader associated with this Command which must be closed first”
在实体对象中访问导航属性里的属性值出现异常“There is already an open DataReader associated with this Command which must be ...
- 关于MultipleActiveResultSets属性导致的There is already an open DataReader associated with this Command which must be closed first的解决方法
执行SqlDataReader.Read之后,如果还想用另一个SqlCommand执行Insert或者Update操作的话,会得到一个错误提示:There is already an open Dat ...
- 多线程下,多次操作数据库报错,There is already an open DataReader associated with this Command which must be closed first.
原文:https://www.cnblogs.com/sdusrz/p/4433108.html 执行SqlDataReader.Read之后,如果还想用另一个SqlCommand执行Insert或者 ...
- error 'there is already an open datareader associated with this command which must be closed first'
This can be easily solved by allowing MARS in your connection string. Add MultipleActiveResultSets=t ...
- There is already an open DataReader associated with this Connection which must be closed first
使用MVC4 EF Linq获取foreach列表循环的时候遇到了如下的问题:报错提示 There is already an open DataReader associated with this ...
- C#.net mysql There is already an open datareader associated with this command引发的问题
[参考]There is already an open datareader associated with this command引发的问题 我在语句中并未使用 DataReader,未何也提示 ...
- EF There is already an open DataReader associated with this Command
捕捉到 System.InvalidOperationException _HResult=-2146233079 _message=意外的连接状态.在使用包装提供程序时,请确保在已包装的 DbCon ...
- There is already an open DataReader associated with this Connection which must be closed first EF
废话不多说,直接 上图,及解决办法.不过问题还不是太清楚到底为什么会出现这个情况..........
随机推荐
- tensorflow 待阅读的资料
tensorflow性能调优实践 https://www.jianshu.com/p/937a0ce99f56 2018.04.01 Deep Learning 之 最优化方法 https://blo ...
- BIO/NIO/AIO的区分(十四)
BIO:同步阻塞IO(平常说的IO指的是BIO)NIO:同步非阻塞IOAIO:异步非阻塞IO io操作分为两部分,发起io请求,和io数据读写. 阻塞.非阻塞主要是针对线程发起io请求后,是否立即返回 ...
- 其它 dev是什么意思
原文:https://blog.csdn.net/zsl131557/article/details/80886114 原文:https://blog.csdn.net/LYmahang123/art ...
- 【转载】预处器的对比——Sass、LESS和Stylus
常用的3大css预编译器:Sass.LESS和Stylus,你是否会混淆它们的区别和用法.这里有篇文章介绍的挺详细. 传送门:https://www.w3cplus.com/css/sass-vs-l ...
- machine_math
1.导数与函数的凹凸性关系: 从下往上看,如果函数是凸出来的就是凸函数,如果是凹的就是凹函数. 函数的凹凸性是二阶函数来判断的. 如果二阶函数大于零,那么就是凸函数,否则就是凹函数. 2.一阶导数为零 ...
- oracle--CRS-0215 : Could not start resource 'ora.node2.ons'.
01,问题描述 安装10G+RAC集群,在node2进行vipca操作的时候发现这个问题 02,问题解决 原因是少了host的回环地址,当时删除错了 添加进去即可 127.0.0.1 localhos ...
- GreenPlum 大数据平台--基础使用(二)
连接参数 连接参数 描述 环境变量 应用名称 连接到数据库的应用名称,保存在application_name连接参数中.默认值是psql. $PGAPPNAME 数据库名 用户想要连接的数据库名称.对 ...
- HDU 3686 Traffic Real Time Query System(点双连通)
题意 给定一张 \(n\) 个点 \(m\) 条边的无向图,\(q\) 次询问,每次询问两边之间的必经之点个数. 思路 求两点之间必经之边的个数用的是边双缩点,再求树上距离.而对比边双和点双之 ...
- 雪花算法(snowflake)的JAVA实现
snowflake算法由twitter公司出品,原始版本是scala版,用于生成分布式ID,结构图: 算法描述: 最高位是符号位,始终为0,不可用. 41位的时间序列,精确到毫秒级,41位的长度可以使 ...
- 大话设计模式Python实现-装饰模式
装饰模式(Decorator Pattern):动态的给一个对象添加一些额外的职责,就增加功能来说,装饰模式比生成子类更为灵活. 下面是一个给人穿衣服的过程,使用装饰模式: #!/usr/bin/en ...