Dataset: How to Access specific column data?

  • Thread starter Thread starter David M
  • Start date Start date
D

David M

When using a dataset, how can one get to a column data element using this
format:

dataset.Tables[0].Rows[0]....

I can get to a specific row, but I am not sure how to get to the column or
data. I tried using the keyword Column, but no luck.

Also, is direct access the best way to access this data, or should I be
using different DataRows, etc. Keywords

Thanks
 
David,
Use .Columns[xx] where xx is either a number or a string with the field
name. You can also use a name for the Table index.
Ron Allen
 
Oops,
Ignore the Columns in the previous and use just [xx] where xx is either
a string or integer key. I've been working with a custom control with a
Columns collection for about the last 2 days and my mind was 'stuck' on
columns.
Ron Allen
Ron Allen said:
David,
Use .Columns[xx] where xx is either a number or a string with the field
name. You can also use a name for the Table index.
Ron Allen
David M said:
When using a dataset, how can one get to a column data element using this
format:

dataset.Tables[0].Rows[0]....

I can get to a specific row, but I am not sure how to get to the column or
data. I tried using the keyword Column, but no luck.

Also, is direct access the best way to access this data, or should I be
using different DataRows, etc. Keywords

Thanks
 
Back
Top