08-11-15, 06:46 PM
PHP كود :
Try
If con.State = ConnectionState.Closed Then con.Open()
Dim SQLstr As String = "select Age from TableName Where Name='" & ComboBox1.SelectedValue & "' And ClassName='" & ComboBox2.SelectedValue & "'"
Dim Cmd As New SqlClient.SqlCommand(SQLstr, Con)
TextBox1.Text = Cmd.ExecuteScalar
If Con.State = ConnectionState.Open Then Con.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
