untyped datatable searching

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hey all,
if i have an untyped datatable of, say, employee id's.

Emp ID, Name
14, John
14, John
2, Tom
3, Sally

How can I search the datatable to find if EmpID 14 even exists in the table?

thanks,
rodchar
 
When you say "untyped datatable", what do you mean? Do you mean it's a
datatable you defined, not a strongly typed one?

Here's an example. It's in VB, but you get the general idea.


dt.PrimaryKey = New DataColumn() {dt.Columns("OrderID"),
dt.Columns("ProductID")}
Dim objCriteria As New Object() {10643, 28}
Dim row As DataRow = dt.Rows.Find(objCriteria)


Robin S.
 
Back
Top