So we built better training tools.
-Dedicated Cloud Servers
All at your fingertips. What are you waiting for?
Private Sub CustomerRefComboBox_SelectedIndexChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CustomerRefComboBox.SelectedIndexChanged Dim Con As New MySqlConnection Dim Com As New MySqlCommand Dim Da As New MySqlDataAdapter Dim Ds As New DataSet Dim Dt As New DataTable Dim CustomerRef As String Dim sql As String CustomerRef = CustomerRefComboBox.Text sql = "Select * from Customers where Name ='" & CustomerRef & "'" Con = GetConnection() Try Con.Open() Com.Connection = Con Com.CommandText = sql Da.SelectCommand = Com Da.Fill(Dt) CustomerIDTextBox.Text = Ds.Tables("Customers").Rows(0).Item("CustomerID").ToString() Catch ex As Exception MessageBox.Show(ex.Message) End Try
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.