J
Jason L James
Hi all,
I have a problem when attempting to
delete datarowview obecjts from a
data view
Dim mydv As New DataView
Dim thisDRV As DataRowView
mydv.Table = myDS.Tables("CountedItem")
mydv.RowFilter = "ilID = '" & lID & "'"
For Each thisDRV In mydv
thisDRV.Delete()
Next
When I execute this code I get an
IndexOutOfRangeException exception. However,
if I print the first column of the datarowviews they all
exist.
Dim mydv As New DataView
Dim thisDRV As DataRowView
mydv.Table = myDS.Tables("CountedItem")
mydv.RowFilter = "ilID = '" & lID & "'"
For Each thisDRV In mydv
debug.writeline(thisDRV(0))
Next
Is there something funny happeneing
with the deleting of a datarowview from a
dataview? Is this the correct way to delete
a subset of rows from a datatable?
Many thanks,
Jason.
I have a problem when attempting to
delete datarowview obecjts from a
data view
Dim mydv As New DataView
Dim thisDRV As DataRowView
mydv.Table = myDS.Tables("CountedItem")
mydv.RowFilter = "ilID = '" & lID & "'"
For Each thisDRV In mydv
thisDRV.Delete()
Next
When I execute this code I get an
IndexOutOfRangeException exception. However,
if I print the first column of the datarowviews they all
exist.
Dim mydv As New DataView
Dim thisDRV As DataRowView
mydv.Table = myDS.Tables("CountedItem")
mydv.RowFilter = "ilID = '" & lID & "'"
For Each thisDRV In mydv
debug.writeline(thisDRV(0))
Next
Is there something funny happeneing
with the deleting of a datarowview from a
dataview? Is this the correct way to delete
a subset of rows from a datatable?
Many thanks,
Jason.