Dim Query As String
Query = "Select * from Charges where DOctype='" & Labeldoctype.Text & "'"
Dim cmd As New SqlCommand(Query, con)
con.Open()
Dim dataAdapter As New SqlDataAdapter(Query, con)
dataAdapter.Fill(dt)
dataAdapter.Dispose()
For i As Integer = 0 To (dt.Rows.Count - 1)
rowindex = i
LabelV001.Text = (dt.Rows(0)("Head")).ToString
LabelV002.Text = (dt.Rows(1)("Head")).ToString
Next
con.Close()