D
Dave
Hello,
What is the best way (performance wise) to search for a row in a table?
Let say I have a column named "col1" and what to get the row that the value
of "col1" is "It is me"...
I can set this column as the primary key to use the find method if it worths
it.
So my options are:
1- using the DataTable.Select method and provide a criteria like "col1 = 'It
is me'"
2- creating a primary with "col1" and use the DataTable.Rows.Find("It is
me")
3- using a foreach statement to loop thru each row of the table and find the
row where the value of "col1" = "It is me"
any other better ways?
Thanks,
David
What is the best way (performance wise) to search for a row in a table?
Let say I have a column named "col1" and what to get the row that the value
of "col1" is "It is me"...
I can set this column as the primary key to use the find method if it worths
it.
So my options are:
1- using the DataTable.Select method and provide a criteria like "col1 = 'It
is me'"
2- creating a primary with "col1" and use the DataTable.Rows.Find("It is
me")
3- using a foreach statement to loop thru each row of the table and find the
row where the value of "col1" = "It is me"
any other better ways?
Thanks,
David