Sql = "SELECT * FROM Saraly where id='" & TextBox1.Text & "' AND mount_pay='" & ComboBox1.Text & '"
Dim Cmd As New SqlCommand(Sql, Cls.Con)
Dim Rs As SqlDataReader = Cmd.ExecuteReader
If Rs.Read Then
Dim myConn As SqlConnection
myConn = New SqlConnection(ConfigurationManager.ConnectionStrings("ชื่อDataConnectionString").ConnectionString)
Dim myCommand2 As SqlCommand = New SqlCommand()
myCommand2.CommandText = "SELECT LAST(Detail.Conclution) AS A"
myCommand2.CommandText &= " FROM Detail"
myCommand2.CommandType = CommandType.Text
myCommand2.Connection = myConn
myCommand2.Connection.Open()
Dim myReader2 As SqlDataReader
myReader2 = myCommand2.ExecuteReader(CommandBehavior.CloseConnection)
GridView1.DataSource = myReader2
GridView1.DataBind()
myCommand2.Dispose()
myConn.Dispose()