"index 0 Is Either Negative Or Above Row Count" Error C#
I need help too much. I am getting the following exception: Index 0 is either negative or above row count error I researched in stackoverflow and google, but I couldn't fixed er
Solution 1:
Which means the DataView, dataw is Empty(the query returns no records) . So you have to Check for Empty before accessing the Value from it.
DataView dataw = new DataView(ReturnTable(gmyquery));
if (dataw!=null && dataw.Count > 0)
{
// Your code here
}
Post a Comment for ""index 0 Is Either Negative Or Above Row Count" Error C#"