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

ให้เพิ่ม 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.
Powered by WordPress | Shop Free T-Mobile Phones Online | Thanks to Verizon Phones without Contract, MMORPG Games and Sell Car