Cita:
Iniciado por univercity MyCommand1 = New OleDbDataAdapter("select * from vinos where Variedad=MySelect.SelectedValue.ToString()", MyConnection2)
LO cambie por esto: (pero ahora me dice, Unable to validate data)
Dim MyCommand1 As OleDbDataAdapter
MyCommand1.SelectCommand.Parameters.Add(New OleDbParameter("@cuba", SqlDbType.VarChar))
MyCommand1.SelectCommand.Parameters("@cuba").Value = MySelect.SelectedValue.ToString()
MyCommand1 = New OleDbDataAdapter("select * from vinos where variedad=@cuba", MyConnection2)
DS1 = new DataSet()
MyCommand1.Fill(DS1, "vinos")
Prueba a ponerlo asi:
Dim MyCommand1 As OleDbDataAdapter
MyCommand1 = New OleDbDataAdapter("select * from vinos where variedad=@cuba", MyConnection2)
MyCommand1.SelectCommand.Parameters.Add(New OleDbParameter("@cuba", SqlDbType.VarChar))
MyCommand1.SelectCommand.Parameters("@cuba").Value = MySelect.SelectedValue.ToString()
DS1 = new DataSet()
MyCommand1.Fill(DS1, "vinos")