Problem when loop thru dataset.

Jun 18 2009 10:23 AM

when i loop thru dataset like this
foreach
(DataRow dr in TempDataSet.Tables["IndicatorCompanies"].Rowss)
{
addCompanyId =
Convert.ToString(dr["Company"]);
}
it is also retrieving rows that has been deleted earlier and throws exception "deletd rows can not be accesed" .but sometime back with same above loop i was not having any problem .it was working fine.but now it started giving problem that i have mentioned.why that is happening now..? Pls help