locked
expection RRS feed

  • Question

  • User1665719730 posted

    An exception of type 'System.IndexOutOfRangeException' occurred in System.Data.dll but was not handled in user code

    Friday, October 5, 2018 8:35 AM

All replies

  • User753101303 posted

    Hi,

    See the line on code on which it happens. It means for example that you are using an array index (or here likely a row collection or column collection index) that is outside of the allowed range (ie Rows[6] when you have only 6 rows going Rows[0] to Rows[5] for example).

    Friday, October 5, 2018 9:21 AM
  • User61956409 posted

    Hi nagaraji,

    An exception of type 'System.IndexOutOfRangeException' occurred in System.Data.dll but was not handled in user code

    The exception occurred in System.Data.dll that provides access to classes that represent the ADO.NET architecture, are you dealing with DataSet, DataTable etc? Please post the code snippet that throw this exception, so that we can help troubleshoot the issue based on your code.

    If you are accessing an invalid index of a collection, which might cause the issue. Please debug your code to check the count of item in a collection before you retrieve the item from collection via index.  

    With Regards,

    Fei Han

    Monday, October 8, 2018 3:23 AM