|
-
Dec 2nd, 2011, 04:20 AM
#1
Re: Iterating through Datatable Columns
A DataTable is supposed to be basically an in-memory representation of a database table. Just like for a database table, in a DataTable the data is stored in the rows, not the column. The columns just describe the data, e.g. data type, size, nullability, etc. You need to loop through the rows of the table then, for each row, loop through the columns to get the data from the field from that column in the row. When indexing a DataRow, you can use an ordinal index, i.e. number, or you can use a column name or you can use the DataColumn itself.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|