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=true
to the provider part of your connection string (where Data Source, Initial Catalog, etc. are specified).
http://msdn.microsoft.com/en-us/library/h32h3abf(v=vs.100).aspx
error '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 ...
- 关于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或者 ...
- 在实体对象中访问导航属性里的属性值出现异常“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 ...
- There is already an open DataReader associated with this Command which must be closed first
通常出现在嵌套查询数据库(比如在一个qry的遍历时,又进行了数据库查询) 通过在连接字符串中允许MARS可以轻松解决这个问题. 将MultipleActiveResultSets = true添加到连 ...
- 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,未何也提示 ...
- ERROR: gnu-config-native-20150728+gitAUTOINC+b576fa87c1-r0 do_unpack: Function failed: Fetcher failure: Fetch command failed with exit code 128, output: fatal: the '--set-upstream' option is no longer
/********************************************************************** * ERROR: gnu-config-native-2 ...
- EF There is already an open DataReader associated with this Command
捕捉到 System.InvalidOperationException _HResult=-2146233079 _message=意外的连接状态.在使用包装提供程序时,请确保在已包装的 DbCon ...
随机推荐
- 【转】Paxos算法2-算法过程
——转自:{老码农的专栏} 1.编号处理 根据P2c ,proposer在提案前会先咨询acceptor查看其批准的最大的编号和value,再决定提交哪个value.之前我们一直强调更高编号的prop ...
- 201709021工作日记--Volley源码详解(五)
学习完了CacheDispatcher这个类,下面我们看下NetworkDispatcher这个类的具体细节,先上代码: /** * 提供一个线程执行网络调度的请求分发 * Provides a th ...
- C语言中线程和进程的区别
线程是指进程内的一个执行单元也是进程内的可调度的实体,与进程的区别 1) 调度:线程作为调度和分配的基本单位,进程作为拥有资源的基本单位 2) 并发性:不仅进程之间可以并发执行,同一个进程之间的多个线 ...
- (最短路 Floyd)Cow Contest --POJ--3660
链接: http://poj.org/problem?id=3660 思路: 1. 1->2->3==1->3 2. 记录每次的比赛人员 3. 每个人只能跟他序号不同的人比赛, ...
- ZOJ2478 Encoding 2017-04-18 23:02 43人阅读 评论(0) 收藏
Encoding Time Limit: 2 Seconds Memory Limit: 65536 KB Given a string containing only 'A' - 'Z', ...
- 【PAT Advanced Level】1014. Waiting in Line (30)
简单模拟题,注意读懂题意就行 #include <iostream> #include <queue> using namespace std; #define CUSTOME ...
- 好用的SHELL小编程
1>判断输入为数字,字符或其他 脚本代码: 检测结果: 2>求平均数: 测试效果: 3>自减输出: 脚本代码: 测试效果: 4>在文件 ...
- 前台ajax请求一次,后台代码执行了两次
问题: 后台使用Django,前台发布文章时使用ajax方式,后台执行代码将data数据取出存入数据库 经过排查,是提交按钮type写成了submit,需要写成button,真是 修改后测试 代码执行 ...
- vs web项目远程发布到IIS
一.下载安装 IIS安装管理服务,这里不赘述,安装完后显示如下(装完刷新一下或者重新打开iis) 下载webploy,安装的时候要选中远程功能,或者选择完全安装,否则会因为没有远程模块导致连接失败(注 ...
- 关于Git bash 在win10重装系统情况下闪退并生成mintty.exe.stackdump文件的问题
问题内容:在重装win10系统情况下,有可能会出现安装Git后右击Git bash会出现闪退并生成mintty.exe.stackdump文件 个人解决方案:查看网络上各位网友的意见和解决方法后,自己 ...