D
Dean
The following loop is giving me a DeletedRowInaccessibleException on the
very first delete. I am checking RowState and it is Modified. The
documentation for this exception says that I am trying to access a row that
has been deleted but it has not and I am ensuring that by checking the
RowState first.
For Each row In DsJobHistory1.Tables(0).Rows
For Each myInvoiceStr In MyInvArray
If row.RowState <> DataRowState.Deleted Then
If row("InvoiceNum") = myInvoiceStr Then
row.Delete()
Exit For
End If
End If
Next
Next
Anyone know why?
Thanks,
Dean
very first delete. I am checking RowState and it is Modified. The
documentation for this exception says that I am trying to access a row that
has been deleted but it has not and I am ensuring that by checking the
RowState first.
For Each row In DsJobHistory1.Tables(0).Rows
For Each myInvoiceStr In MyInvArray
If row.RowState <> DataRowState.Deleted Then
If row("InvoiceNum") = myInvoiceStr Then
row.Delete()
Exit For
End If
End If
Next
Next
Anyone know why?
Thanks,
Dean