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

  1. 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 ...

  2. 关于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 ...

  3. 多线程下,多次操作数据库报错,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或者 ...

  4. 在实体对象中访问导航属性里的属性值出现异常“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 ...

  5. There is already an open DataReader associated with this Command which must be closed first

    通常出现在嵌套查询数据库(比如在一个qry的遍历时,又进行了数据库查询) 通过在连接字符串中允许MARS可以轻松解决这个问题. 将MultipleActiveResultSets = true添加到连 ...

  6. 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 ...

  7. C#.net mysql There is already an open datareader associated with this command引发的问题

    [参考]There is already an open datareader associated with this command引发的问题 我在语句中并未使用 DataReader,未何也提示 ...

  8. 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 ...

  9. EF There is already an open DataReader associated with this Command

    捕捉到 System.InvalidOperationException _HResult=-2146233079 _message=意外的连接状态.在使用包装提供程序时,请确保在已包装的 DbCon ...

随机推荐

  1. Spinner功能和用法

    书中只是简单写了选择的界面,没有写出选择之后的结果显示,我做了进一步功能. MainActivity.java public class MainActivity extends Activity { ...

  2. 笔记:记录两个新接触的东东- required + placeholder

    1.1 required="required" 1.2 placeholder 当用户还没有输入值时,输入型控件可能通过placeholder向用户显示描述性说明文字或者提示信息, ...

  3. (KMP 暴力)Corporate Identity -- hdu -- 2328

    http://acm.hdu.edu.cn/showproblem.php?pid=2328 Corporate Identity Time Limit: 9000/3000 MS (Java/Oth ...

  4. (动态规划 最长有序子序列)Monkey and Banana --HDU --1069

    链接: http://acm.hdu.edu.cn/showproblem.php?pid=1069 http://acm.hust.edu.cn/vjudge/contest/view.action ...

  5. New JVM Option Enables Generation of Mixed-Mode Flame Graphs

    转自 https://www.infoq.com/news/2015/08/JVM-Option-mixed-mode-profiles Java has added a new launch opt ...

  6. "名字好难想队“团队项目

    团队展示 1.队名:名字好难想队 2.队员介绍 姓名 学号 岗位 黎扬乐(组长) 3116004689 程序,测试 李世潇 3116004690 策划,美术,动画 梁耀 3116004691 项目管理 ...

  7. pl/sql 语言设置

    1.select * from v$nls_parameters 查询nls的参数,获得数据库服务器端的字符编码 NLS_LANGUAGE NLS_CHARACTERSET 2.修改本地环境变量 NL ...

  8. 项目笔记---事半功倍之GhostDoc(二)

    前言 前一篇文章<项目笔记---事半功倍之StyleCop(一)>提到如何约束代码,规范代码风格,这一节,我们将了解如何快速生成符合规则的代码注释---GhostDoc 一.安装Ghost ...

  9. TempDB--临时表的缓存

    --========================================================================== 在博客园看到一篇文章<SQLServer ...

  10. max渲染通道元素的范例

    renderElementManager = MaxOps.GetCurRenderElementMgr() renderElementManager.Removeallrenderelements( ...