How to enable MultipleActiveResultSets
asp.net, c#, sql
Solution
It is really simple, just add
MultipleActiveResultSets=true;
so change, in your web.config, the connection string in this way:
connectionString="Data Source=MATT-PC\SQLEXPRESS;" +
"Initial Catalog=Raise;Integrated Security=True;" +
"MultipleActiveResultSets=true;"
Problem
I have the following connection string in my code: ``` SqlConnection conn = new SqlConnection(WebConfigurationManager.ConnectionStrings["RaiseFantasyLeagueConnectionString"].ConnectionString); ``` My webconfig for this looks like this: ``` <connectionStrings> <add name="RaiseFantasyLeagueConnectionString" connectionString="Data Source=MATT-PC\SQLEXPRESS;Initial Catalog=Raise;Integrated Security=True" providerName="System.Data.SqlClient"/> ``` Can somebody tell me where I can enable MultipleActiveResultSets for my connection?