Try;
foreach(DataRow vRow in dtSet.Tables["security"].Rows)
str = (string)vRow["name"];
You even have a 'Select' method to process only those rows out of the
'security' table that meet a particular criteria.
You may want to look at strongly typed datasets, which allow you to move
away from late binding of table/field names. You can then refer to the
'name' field as Security.Name - saves hours of grief with finding a type
embedded in quotes, which will only show up at runtime (a typo on a stong
typed name will show up at compile time). Just MPOV.
- Colin
"Keith Smith" <ke*********@verizon.net> wrote in message
news:m_pLd.566$bF4.401@trnddc04...
Take the '.' out of the column reference;
str = (string)dtSet.Tables["security"].Row[0]["name"];
not:
str = (string)dtSet.Tables["security"].Row[0].["name"];
- Colin.
Thanks! That worked!
Is there a way to set the value of "str" to be the "next value in line" as
opposed to having to specify the particular row number? I know in the
past when I programmed in ASP I could create a dataset and then just scroll
through the dataset.