how to display result from data base into textbox and if the result exceed 1 key up and down to preview
con = New SqlConnection(cs)
con.Open()
Dim sql As String = " Select RTRIM(visit.regdate),RTRIM(Patientno) from visit where visit.accno =@d6 "
cmd = New SqlCommand(sql, con)
cmd.Parameters.AddWithValue("d6", accno.Text)
rdr = cmd.ExecuteReader()
While (rdr.Read() = True)
regdate.Value = rdr.GetValue(0)
patientno.Text = rdr.GetValue(1)
End While