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 SelectedValue As String = "SELECT ID_producto, serial FROM producto where serial=" + cboproducto.SelectedValue.ToString 'consulta a la tabla"
Dim comando As New MySqlCommand(SelectedValue, conexion)
Dim adap As New MySqlDataAdapter(comando)
conexion.Open()
adap.Fill(dt)
conexion.Close()
cboserial.DataSource = dt
cboserial.DisplayMember = "serial"
cboserial.ValueMember = "ID_producto"
End Sub
End Class
Disculpa, este es el actual..