Returning One row from TableAdapter
Posted on 2007-11-28
I have created a table adapter that returns one row (selec top 1 ....)
In my Page_Load function, I want to take that value and put it in a label.
Dim IAdapter As New IDataSetTableAdapters.Member1TableAdapter()
Dim members As IDataSet.Member1DataTable
members = IAdapter.GetNumberMembers
For Each member1Row As IDataSet.Member1Row In members
LabelNumMembers.Text = FormatNumber(member1Row.m_id, 0)
How do I convert the "For Each" properly for just one row?
And am I doing the above correctly? It works, so I know it ain't broke. But maybe it's misguided and could be improved?