SqlDataReader and concurrency/deallocation issues
问题 Running the below code is giving me an error: .NET Framework execution was aborted by escalation policy because of out of memory. System.InvalidOperationException: There is already an open DataReader associated with this Command which must be closed first. I have the following code all over the place to run my sql: sql.Append(string.Format("SELECT TableId FROM ps_SavedTables WHERE guid = '{0}'", guid)); using (IDataReader reader = SqlHelper.GetDataReader(sql.ToString())) { if (reader.Read())