Have been working on a project where I need to move through a dataset one row at a time. Now this is not too difficult. However, I just could remember the syntax. After some research I found a strategy …
1. First create a DataTable object:
Private DataTable dataTable;
2. Next, set the dataTable equal to the DataSet table with your data:
DataTable = dataSet.Tables[0];
3. Next get the first row of data from the DataSet:
DataRow dataRow = dataTable.Rows[0];
4. Then get a column value for display such as a text box:
textBox .Text = dataRow[“Fname”].ToString();
Now that was not too hard. Problem is remembering.