Hi,
We are trying to discover the source of a very strange record Add and Delete
problem.
When we Add records to the table the first two records work just fine, but
on the third record a ArgumentOutOfRangeException "Index" is thrown. It is
also thrown when attempting to add a record beyond the third. But, if one
catches the exception and retries the Add it succeeds, most of the time.
Here is the code we use to trap and retry the add
' Create a new row
dr = dsOrder.Tables(TN_ORDER_DETAIL).NewRow()
... Values in the new record are set here
' Add the row
TrydsOrder.Tables(TN_ORDER_DETAIL).Rows.Add(dr)
Catch ex As System.ArgumentOutOfRangeException
dsOrder.Tables(TN_ORDER_DETAIL).Rows.Add(dr)
End Try