J
Joris De Groote
Hi,
(my code is @ the bottom of this message)
I have a piece of code that runs the rows of a dataset until it finds the
one needed. When he finds it, I delete that row and start all over again
with the next row I'm looking for, however. I then get this error:
System.Data.DeletedRowInaccessibleException: Deleted row information cannot
be accessed through the row.
The problem seems to be that the dataset deletes the information of the row,
but still keeps the row in it? Now I want to get rid of that one row so my
next run could potentionaly go faster since it has to go over one record
less each time this runs (when the record is below the one that is deleted
offcourse).
Thanks
Joris
While (vi < ds.Tables("vrachtbrieven").Rows.Count)
If (Not
(ds.Tables("docs").Rows(di).Item(0).ToString.Equals(ds.Tables("vrachtbrieven").Rows(vi).Item(0).ToString)))
Then
erin = False
Else
erin = True
ds.Tables("vrachtbrieven").Rows(vi).Delete()
vi = ds.Tables("vrachtbrieven").Rows.Count
End If
vi += 1
End While
(my code is @ the bottom of this message)
I have a piece of code that runs the rows of a dataset until it finds the
one needed. When he finds it, I delete that row and start all over again
with the next row I'm looking for, however. I then get this error:
System.Data.DeletedRowInaccessibleException: Deleted row information cannot
be accessed through the row.
The problem seems to be that the dataset deletes the information of the row,
but still keeps the row in it? Now I want to get rid of that one row so my
next run could potentionaly go faster since it has to go over one record
less each time this runs (when the record is below the one that is deleted
offcourse).
Thanks
Joris
While (vi < ds.Tables("vrachtbrieven").Rows.Count)
If (Not
(ds.Tables("docs").Rows(di).Item(0).ToString.Equals(ds.Tables("vrachtbrieven").Rows(vi).Item(0).ToString)))
Then
erin = False
Else
erin = True
ds.Tables("vrachtbrieven").Rows(vi).Delete()
vi = ds.Tables("vrachtbrieven").Rows.Count
End If
vi += 1
End While