I have the below code :
if (reader.HasRows)
{
while (reader.Read())
{
DataRow searchedDR = ds.Tables[dr["name"].ToString()].Rows.Find(reader["ID"].ToString());
if (searchedDR != null)
ds.Tables[dr["name"].ToString()].Rows.Remove(searchedDR);
}
}
When this block of code done successfully the data reader (reader) become empty? What is the reason? I need to work with this reader afterward. What is the solution?