0
Good, the code is well optimized
0
OK abdul if you want to use DataReader and displaying all member then replace the loop
while (objReader.Read())
{
objCountry.CountryID = (int)objReader["CountryID"];
objCountry.CountryName = (string)objReader["CountryName"];
list.Add(objCountry);
}
by
do
{
objCountry.CountryID = (int)objReader["CountryID"];
objCountry.CountryName = (string)objReader["CountryName"];
list.Add(objCountry);
objReader.NextResult();
}
while (objReader.Read())
0
Thanks for your reply. please refine your reply sir, i didn't get your point.
0
The Data reader is read-only not udate could be done, forward-only ,
which means we cannot go back to the previous record which was accessed.
It is worth is your case to use a data adapter that fills a data set within the data and then you can use the cached data to leaverage what ever you want, if any changes are done then use adapter.update();