Hi,
When I iterate through my datatable it works fine, but when try to delete a row inside my iteration loop I get this error message “There is no row at position 76”
please help me
'This works
For intI = 0 To ds.Tables(0).Rows.Count - 1
strTest = Convert.ToString(ds.Tables(0).Rows(intI).Item("test"))
If strTest.Substring(0, strDrumNr.Length).ToUpper = strDrumNr.ToUpper Then
lbl1.Text += intI & " -" & CType(ds.Tables(0).Rows(intI).Item("test"), String) & "<BR>"
End If
Next
'Not work
For intI = 0 To ds.Tables(0).Rows.Count - 1
strTest = Convert.ToString(ds.Tables(0).Rows(intI).Item("test"))
If strTest.Substring(0, strDrumNr.Length).ToUpper = strDrumNr.ToUpper Then
ds.Tables(0).Rows(intI).Delete()
lbl1.Text += intI & " -" & CType(ds.Tables(0).Rows(intI).Item("test"), String) & "<BR>"
End If
Next