Wednesday, December 29, 2010

How to fix ASP.NET Error Exception Details: System.InvalidOperationException: There is already an open DataReader associated with this Command which m

Add MultipleActiveResultSets = true in the ConnectionString.

<connectionStrings>

<add name="Default"

connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=MyDb;Persist Security Info=True;User ID=sa;Password=sa;MultipleActiveResultSets=true"

providerName="System.Data.SqlClient"/>

</connectionStrings>

Reference : http://www.memo8.com/toolkits/archives/503

No comments: