标签:
当我开启惰性加载情况下,系统会报此异常信息,出现此异常是发生于Sql server 2005.
解决方法:在数据库连接字符串中添加MARS信息为true
<add name="CRGDatabase" connectionString="Data Source=./;Initial Catalog=DB;uid=User;pwd=Pwd;MultipleActiveResultSets=true;" providerName="System.Data.SqlClient"/>
There is already an open DataReader associated with this Command which must be closed first.
标签:
原文地址:http://www.cnblogs.com/gary-shao/p/5369955.html