Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim cmd As New SqlCommand
Dim dsChk As New DataSet
Dim daChk As New SqlDataAdapter
Dim sqlselect As String = ""
conn.Open()
sqlselect = "Select core from Core_Competency"
cmd = New SqlCommand()
dsChk.Clear()
daChk = New SqlDataAdapter(sqlselect, conn)
daChk.Fill(dsChk, "Core_Competency")
With cmd
.CommandType = CommandType.Text
.CommandText = sqlselect
.Connection = conn
dr = .ExecuteReader()
End With
dr.Read()
If dr.HasRows Then
Label4.Text = CStr(dr(0))
' Label5.Text = จะให้เป็นคำถามแถว 2 อย่างไร
End If
dr.Close()
End Sub