The issue I am having is that I want to find a row at a specific position. However, I do not want to start the enumeration back at 0 or 1.
if I find my first row as position 1000 I want to start back at 1000 and keep moving forward until I find the next row. So, If I have a second row found at position 5,000 then I want to start from there....etc.
this will keep the search time to a minimum. I noticed that if a row is found 100,000 + rows later the amount of time spending to find the row increases by quite a bit.
Public Function get_row(table_name As String, column_name As String)
Dim row_pos As String
Dim sampleResults = From sampleRow In IDlibrary.Tables(table_name).AsEnumerable() Where sampleRow.Field(Of Integer)(column_name) = CallByName(nwindividual, "Individual_ID", CallType.Method, Nothing) Select IDlibrary.Tables(table_name).Rows.IndexOf(sampleRow)
row_pos = sampleResults(0)
Return row_pos
End Function
what I am looking for would be something like this x is the number that changes based on row position found
IDlibrary.Tables(table_name).rows( x &": whatever the full table amount is") I know this is not how it works but trying to show you what I am talking about.
I have seen were a dataadapter would fill a range:
DataAdapter.Fill(Dataset, 5, 3, "tablename")
I am looking for something like that but with an already filled data table in a dataset.
What I have tried:
I have tried to research methods of a asnumerable select range. I could not find anything. I figured that someone might have tried this before and could help me under stand how to achieve this.