www.allfree-stuff.com


Wednesday, June 3, 2009

Fixing the "There is already an open DataReader associated with this Command which must be closed first." exception in ASP .NET 2.0


Fixing the "There is already an open DataReader associated with this Command which must be closed first." exception in ASP .NET 2.0

if you are using SQL Server 2005, you can just enable MARS in your connection string.

add name="YourDBConnectionString" connectionString="metadata=.;
provider=System.Data.SqlClient;provider connection string="Data Source=rka;Initial Catalog=YourDataBase;Integrated Security=True;
MultipleActiveResultSets=true"" providerName="System.Data.Mapping" /


No comments: