วิธีแก้ไข ASP.NET Error Exception Details: System.InvalidOperationException: There is already an open DataReader associated with this Command which must be closed first.

June 27th, 2010

admin | 1,110 views
ให้เพิ่ม MultipleActiveResultSets=true ใน 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>
ที่มา : http://blog.sb2.fr/post/2008/12/10/There-is-already-an-open-DataReader-associated-with-this-Command-which-must-be-closed-first.aspx
You can
leave a response, or
trackback from your own site.
Responses are currently closed, but you can
trackback from your own site.
You can skip to the end and leave a response. Pinging is currently not allowed.
Both comments and pings are currently closed.