Accessing a Column

  • Thread starter Thread starter Jim Heavey
  • Start date Start date
J

Jim Heavey

If I want to access a column, I am not quite sure how you do this when you
are "drilling" from the DataSet, say for example...

ds.Tables["Skaters"].Rows[0]

So I can access the "1st" row, but how to get to the column information?
The only way I know to get at the column infomation is to create a DataRow
and then from there it is not problem. Is that the "best" way to get at
the column information for the specified row.

Thanks in advance for your assistance!!!!
 
You say "Column Information"

For metadata use ds.Tables["Skaters"].Columns[ColName]

For the data in that field use ds.Tables["Skaters"].Rows[0]["MyColumnName"]
or you can use the column index.

Hope this helps.

Nick Harris, MCSD
http://www.VizSoft.net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top