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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top