Hey.I need some help in navigating rows.Im using a DataReader to read and display data.Now im trying to navigate the data that i have retrieved and i have a proble with that
These are my codings for the retrieving part:
Dim conn As OleDbConnection
Try
conn = New OleDbConnection(My.Settings.ConnectionString)
conn.Open()
Dim asql As String = "Select * From IDM_IDEA_DATA Where TEAM_NAME='" & cboTeam.Text.Trim & "' Order By DATE_SUBMITTED Desc" ' AND IDEA_ID='" & cboID.Text & "'"
Dim cmd As New OleDbCommand(asql, conn)
Dim dr As OleDbDataReader
dr = cmd.ExecuteReader()
If dr.HasRows Then
If dr.Read Then
If IsDBNull(dr(2)) = False Then
txtPDesc.Text = dr(2)
End If
If IsDBNull(dr(3)) = False Then
txtIDesc.Text = dr(3)
End If
If IsDBNull(dr(4)) = False Then
txtComments.Text = dr(4)
End If
If IsDBNull(dr(7)) = False Then
cboStatus.Text = dr(7)
End If
'If IsDBNull(dr(8)) = False Then
' chkQualify.Checked = True
' chkQualify.Text = dr(8)
'End If
If IsDBNull(dr(10)) = False Then
txtSubmitDate.Text = dr(10)
End If
If IsDBNull(dr(12)) = False Then
txtQualDate.Text = dr(12)
End If
If IsDBNull(dr(0)) = False Then
cboID.Text = dr(0)
End If
End If
End If
Dim i As Integer
While dr.Read
i += 1
End While
dr.Close()
conn.Close()
Me.txtNoItems.Text = i
Catch ex As Exception
MsgBox(ex.Message)
End Try
Hope u guys can give me hand in this.
Thx