Hello All,
I need to iterate through a filled datatable and create a second datatable with rows of fields derived from the raw data (doing math and things along the way).
da.Fill(dsFullCard.Tables(0))
Dim row As DataRow
For Each row In dtRawCard.AsEnumerable()
With dtCard.NewRow
.Item(0) = dtRawCard.Rows.Item(3)
The line: da.Fill(dsFullCard.Tables(0)) works and a datatable ("dtRawCard") is sitting there all nice and full of data with no headers. DataTable Visualizer shows them as F1, F2...(even though 0 based, but, whatever...)
My question is: how do you address the fields in a datatable with no headers?
I know ".Item(0) = dtRawCard.Rows.Item(3)" tries to cast (in this case) a uInt16 -> a Rows object which is wrong--along with about 300 other variations I've tried. Anybody know what is right?
(Hopefully the answer to addressing fields will also apply to queries in Linq to datasets, which I'll be getting to next :O)
Appreciate any advice.
Charlie