How would i get a specific row and a column of that row out of a dataset

say i have a dataset "addresses"

and i want to get the address out of that dataset that has the house number
"123" how would i retrieve that row, then refrence the columns of that row?
thanks!

RE: getting a row out of a data set based on a key by anonymous

anonymous
Fri Feb 20 11:31:05 CST 2004

Take a look at DataTable.Select method

Tu-Thac
www.ongtech.co

----- Brian Henry wrote: ----

How would i get a specific row and a column of that row out of a datase

say i have a dataset "addresses

and i want to get the address out of that dataset that has the house numbe
"123" how would i retrieve that row, then refrence the columns of that row
thanks




Re: getting a row out of a data set based on a key by Kirk

Kirk
Fri Feb 20 14:15:34 CST 2004

assuming a dataset named addresses with a single datatable containing 2
columns, HouseNum and Address where HouseNum is assumed to be a unique
value.
---------------------
System.Data.DataView dv = new DataView(addresses.Tables[0]);
dv.RowFilter = "HouseNum = 123";
MessageBox.Show(dv[0]["Address"].ToString()) ;
---------------------

Kirk Graves
KRGIT Software

"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:uTNgiT99DHA.4080@tk2msftngp13.phx.gbl...
> How would i get a specific row and a column of that row out of a dataset
>
> say i have a dataset "addresses"
>
> and i want to get the address out of that dataset that has the house
number
> "123" how would i retrieve that row, then refrence the columns of that
row?
> thanks!
>
>