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:
Post a Comment