Y sí que esta muy mal
jajaja pero estabas cerca :
Código vb:
Ver originalPrivate Sub cboproducto_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboproducto.SelectedIndexChanged
Dim dt As New DataTable
Dim conexion As New MySqlConnection("Server=localhost; Database=controlsmi; user=root; password=Smi2012") 'cadena conexion
Dim consulta As String = "SELECT XXXXX, XXXXX FROM serial where ID_producto= " + cboproducto.SelectedValue.ToString() 'consulta a la tabla"
Dim comando As New MySqlCommand(consulta, conexion)
Dim adap As New MySqlDataAdapter(comando)
conexion.Open()
adap.Fill(dt)
conexion.Close()
cboSerial.DataSource = dt
cboSerial.DisplayMember = "XXXXX"
cboSerial.ValueMember = "XXXXX"
End Sub
Prueba y nos comentas. Saludos!
.