如何在特定列的文本框中获取特定行的明智值

时间:2019-01-31 09:10:11

标签: vb.net ado.net

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()

0 个答案:

没有答案