ASHX C# problem with DROP TABLE
How can I resolve the error below
SqlCommand listtables = new SqlCommand("SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES", conn);
using (SqlDataReader listtablesreader = listtables.ExecuteReader())
if(listtablesreader["TABLE_NAME"].ToString().IndexOf("govfin_supplement_") > -1)
tabid = listtablesreader["TABLE_NAME"].ToString();
SqlCommand droptab = new SqlCommand(@"
DROP TABLE [dbo].[" + tabid +@"]", conn);
There is already an open DataReader associated with this Command which must be closed first.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: There is already an open DataReader associated with this Command which must be closed firs