How do You Get a Specific Value From a System.Data.DataTable Object?

Posted by Giffyguy on Stack Overflow See other posts from Stack Overflow or by Giffyguy
Published on 2009-07-07T19:27:51Z Indexed on 2010/03/25 4:43 UTC
Read the original article Hit count: 393

Filed under:
|
|
|
|

I'm a low-level algorithm programmer, and databases are not really my thing - so this'll be a n00b question if ever there was one.

I'm running a simple SELECT query through our development team's DAO. The DAO returns a System.Data.DataTable object containing the results of the query. This is all working fine so far.

The problem I have run into now:
I need to pull a value out of one of the fields of the first row in the resulting DataTable - and I have no idea where to even start. Microsoft is so confusing about this! Arrrg!

Any advice would be appreciated. I'm not providing any code samples, because I believe that context is unnecessary here. I'm assuming that all DataTable objects work the same way, no matter how you run your queries - and therefore any additional information would just make this more confusing for everyone.

© Stack Overflow or respective owner

Related posts about sql

Related posts about datatable