M
MattB
I know I can use dataviews and more looping to do this, but I'm
wondering if there's a more elegant or more concise way to do this.
I've got two DataTables with a column called guest_no. I'd love to be
able to use something like the .IndexOf method of arrays and bound
controls. Somehting like:
Dim r as DataRow
For Each r in DataTable2.Rows
If DataTable1.Columns("guest_no").IndexOf(r("guest_no")) <> -1
'record exists
'do something
Else
'record doesn't exist
'do something else
End If
End For
Is there anything like this? Obviously, the code above doesn't work.
Thanks,
Matt
wondering if there's a more elegant or more concise way to do this.
I've got two DataTables with a column called guest_no. I'd love to be
able to use something like the .IndexOf method of arrays and bound
controls. Somehting like:
Dim r as DataRow
For Each r in DataTable2.Rows
If DataTable1.Columns("guest_no").IndexOf(r("guest_no")) <> -1
'record exists
'do something
Else
'record doesn't exist
'do something else
End If
End For
Is there anything like this? Obviously, the code above doesn't work.
Thanks,
Matt