XerTroV Posted April 13, 2022 at 05:45 PM Report Share #625771 Posted April 13, 2022 at 05:45 PM Boa tarde, estou fazendo esta ferramenta porem estou tendo problema para o combobox selecionar todos os itens na tabela vinculados a mesma index, o programa só esta puxando o primeiro item alguém poderia ajudar a solucionar o problema no código ? pW2OQjv.jpg Private Sub ComboBox4_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox4.SelectedIndexChanged Dim con As SqlConnection = New SqlConnection(strCon) Dim command As New SqlCommand("Select * from Character where name = '" & ComboBox4.Text & "'", con) Dim adapter As New SqlDataAdapter(command) Dim table As New DataTable() adapter.Fill(table) ComboBox5.DataSource = table ComboBox5.DisplayMember = "AccountID" ComboBox5.ValueMember = "name" ComboBox5.Text = "" End Sub Obrigado. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now