Lotok
Well-known member
I've done these a million times but for some reason this one isn't working, I just cant see why.
Dataset mapds has 1 table and 1 column with 40k rows of numbers, int64's mainly but some smaller.
All I am doing is comparing a set of numbers in another dataset to the numbers in mapds. If they match then delete the row.
the variable 'row' points to the other data set. ds.tables(0).rows(i)
When stepping into the code I can see that CStr(row.Item(4)).Remove(".0") & "'") is returning the correct number and that the column of the dataset I am searching shows MPRN. But my found() (datarow array) never gets any values. So for some reason the select isn't working.
Just after some fresh ideas and ideas. No doubt some stupid typo.
Dim tmptable As DataTable = mapds.Tables(0)
Dim found() As DataRow = Nothing
Dim dr As DataRow
found = tmptable.Select("MPRN = '" & CStr(row.Item(4)).Remove(".0") & "'")
'check for match and delete
For Each dr In found
dr.Delete()
Next
[/code]
Dataset mapds has 1 table and 1 column with 40k rows of numbers, int64's mainly but some smaller.
All I am doing is comparing a set of numbers in another dataset to the numbers in mapds. If they match then delete the row.
the variable 'row' points to the other data set. ds.tables(0).rows(i)
When stepping into the code I can see that CStr(row.Item(4)).Remove(".0") & "'") is returning the correct number and that the column of the dataset I am searching shows MPRN. But my found() (datarow array) never gets any values. So for some reason the select isn't working.
Just after some fresh ideas and ideas. No doubt some stupid typo.
Dim tmptable As DataTable = mapds.Tables(0)
Dim found() As DataRow = Nothing
Dim dr As DataRow
found = tmptable.Select("MPRN = '" & CStr(row.Item(4)).Remove(".0") & "'")
'check for match and delete
For Each dr In found
dr.Delete()
Next
[/code]