Fred,
In addition to the other examples you can use:
Dim table As DataTable
For Each row As DataRow in table.Rows
' do something with the row
Next
For Each row As DataRow in table.Select()
' do something with the row
Next
Dim view As New DataView(table)
For Each row As DataRowView in view
' do something with the row
Next
Each is useful in their own right. Most of the time I use the first.
DataTable & DataView allow you to filter rows. The second is useful if you
want to delete selected rows, as DataTable.Select returns an array of rows,
allowing you to use DataRow.Delete to delete the row from the DataTable
itself, Also DataTable.Select is overloaded so you can sort & filter the
returned rows. The DataView has some very flexible sorting, searching, and
filtering abilities, plus you can bind to it.
I recommend David Sceppa's book "Microsoft ADO.NET - Core Reference" from MS
Press. As it is a good tutorial on ADO.NET as well as a good desk reference
once you know ADO.NET.
Hope this helps
Jay
"Fred Nelson" <fr**@smartybird.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Hi:
I have created a datatable and I'm able to access it by key values.
I need to be able to go to the "top" of the datatable and process
records sequentially until they are completed.
I can't figure out the command to set me to the top or "beginning" and
then read. (datatable.select?)
Any help in the steps to do this would be greatly appreciated!
Thanks,
Fred