Example straight from the docs;
Dim reader As SqlClient.SqlDataReader
Dim recordData As String = ""
Dim recordCount As Integer = 0
Dim i As Integer = 0
sqlConnection1.Open()
reader = sqlDataAdapter1.SelectCommand.ExecuteReader()
While reader.Read()
For i = 0 To reader.FieldCount - 1
recordData &= reader(i).ToString()
recordData &= "-"
Next
recordData &= ControlChars.CrLf
recordCount += 1
End While
sqlConnection1.Close()
MessageBox.Show("Records processed: " & recordCount)
MessageBox.Show("Data:" & ControlChars.CrLf & recordData)
However, i would use a bindingsource, and then bind the controls to that.
There is a good video on MSDN on Forms over Data, and there are a few others in the series that are worth watching.
http://msdn.microsoft.com/en-gb/vbasic/bb725824.aspx[
^]