468,780 Members | 2,357 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,780 developers. It's quick & easy.

DataTable.Rows.Find

Hi,
I have created DataSet and DataTable. I want to be able to locate a row in
that table by looking for a particular value in a field. Lets say I have
Field1, Field2 and Field3.
Sometimes I need to find a rows, for which Field1 = 15, and sometimes I need
to find rows where Field2 = "something".
As far as I read docs about Rows.Find method, I need a keys. OK, I have
created a keys in the table, lets say Key1 for Field1 and Key2 for Field2.
And .. I don't know how to use them, as in docs I have to pass to Find
method and object or array of objects with values. But how I specify that
I'll use one or another key, i.e. which field I'm searching?

Thanks
Sunny
Nov 15 '05 #1
1 17529
Thanks, it works for me :)
Sunny

"-zir-" <ma**@zironline.com> wrote in message
news:u2**************@TK2MSFTNGP09.phx.gbl...
Try: DataTable.Select()
You dont need a key for this, method returns rows matching criteria.

-zir

"Sunny" <su******@icebergwireless.com> wrote in message
news:e6**************@TK2MSFTNGP12.phx.gbl...
Hi,
I have created DataSet and DataTable. I want to be able to locate a row in that table by looking for a particular value in a field. Lets say I have
Field1, Field2 and Field3.
Sometimes I need to find a rows, for which Field1 = 15, and sometimes I

need
to find rows where Field2 = "something".
As far as I read docs about Rows.Find method, I need a keys. OK, I have
created a keys in the table, lets say Key1 for Field1 and Key2 for Field2. And .. I don't know how to use them, as in docs I have to pass to Find
method and object or array of objects with values. But how I specify that I'll use one or another key, i.e. which field I'm searching?

Thanks
Sunny


Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Solel Software | last post: by
7 posts views Thread by wk6pack | last post: by
6 posts views Thread by Danny Ni | last post: by
9 posts views Thread by Anil Gupte | last post: by
2 posts views Thread by =?Utf-8?B?Sm9iIExvdA==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.