RSS

Tag Archives: shows the error as There is no row at position 0.

there is no row at position 0


it is always good to validate wether the dataset has data or is empty you can use something like this to cover all validations

if(ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
{
//process data
}
else
{
// it is empty
}

 
1 Comment

Posted by on December 7, 2012 in ASP Dot Net C#

 

Tags: , ,