Error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,

Off late, I have been getting this error message often. I am not able to
figure out the source. Any pointers?

Thank you.

ErrorMessage: ------------- There is no row at position 2. ErrorSource:
------------- System.Data ErrorTargetSite: ----------------
System.Data.DataRow get_Item(Int32) ErrorTrace: ---------------- at
System.Data.DataRowCollection.get_Item(Int32 index)
 
This could possibly be because your datatable has two, or fewer rows
and you are trying to obtain the third.

Put a breakpoint at this code and when the debugger breaks type this
code into your immediate window:

yourDataTable.Rows.Count

It will tell you how may rows are in your datatable
 
Back
Top