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 ...
随机推荐
- 31. The New Bread Earners 挣钱养家的新军
31. The New Bread Earners 挣钱养家的新军 ① They call them the new bread earners.They are women,and they are ...
- C#和MatLab的混合编程(充分利用二者的优势)
C#和MatLab的混合编程,充分利用了winform的直观显示和matlab的强大计算能力.在此以一个小例子的形式给大家讲述一下二者混合编程的实现. 一.软件的配置说明 C#版本:VS2010:Ma ...
- Exception: java.io.FileNotFoundException: D:\Users\liuyangOS2237\Workspaces\MyEclipse%2010\Zhuce\WebRoot\WEB-INF\classes\users.xml (系统找不到指定的路径。解决
com.exception.DaoException: java.io.FileNotFoundException: D:\Users\liuyangOS2237\Workspaces\MyEclip ...
- js之create()
语法: Object.create(proto, [propertiesObject]) 返回一个新的对象的指针 proto:对象会被作为新创建的对象的原型 [propertiesObject]:对象 ...
- EditPlus常用快捷键[私人]
EditPlus快捷键大全网上一搜一大把, 本文档只记录自己常用的快捷键, 随时更新: 必用: ctrl + c 复制 ctrl + x 剪切 ctrl + v 粘贴 ctrl + z 回滚 ctrl ...
- 从LSM-Tree、COLA-Tree谈到StackOverflow、OSQA
转自: http://blog.csdn.net/v_july_v/article/details/7526689 从LSM-Tree.COLA-Tree谈到StackOverflow.OSQA 作者 ...
- Scala类型检查与转换
Scala类型检查与转换 isInstanceOf:检查某个对象是否属于某个给定的类. asInstanceOf:将引用转换为子类的引用. classOf:如果想测试p指向的是一个Employee对象 ...
- TCP/IP模型的一个简单解释
TCP/IP模型是互联网的基础. 想要理解互联网,就必须理解这个模型.但是,它不好懂,我就从来没有搞懂过. 前几天,BetterExplained上有一篇文章,很通俗地解释了这个模型.我读后有一种恍然 ...
- Android蓝牙联机Demo解析
写在前面: 手游的双人对战实现方式有很多,比如: 联网对战(需要一个服务器负责转发客户端请求,各种大型手游的做法) 分屏对战(手机上下分屏,典型的例子就是切水果的双人对战) 蓝牙联机对战(通过蓝牙联机 ...
- Python 爬虫实战—盘搜搜
近期公司给了个任务:根据关键搜索百度网盘共享文件并下载. 琢磨了几天写下了一段简单的demo代码,后期优化没有处理. 主要的思路:(1)根据关键字爬取盘搜搜的相关信息 (2)解析并获取盘搜搜跳转到百度 ...