Jasmin M

Jasmin M

  • NA
  • 8
  • 3.4k

ComboBox Filtering (Cascading) Problem.

Dec 5 2013 2:17 PM
Hello , im develping an university schedule and im having a problem with ComboBox cascading, and im not finding the answer yet.
So what i want to do is to Filter the COURSE  based on CATHEDRA and YEAR .
so CATHEDRA is comboBox1 , YEAR is comboBox2 and COURSE is comboBox3.
the Cathedra data is used from the database , but the YEAR numers are used from the comboBox2 EDIT ITEMS ( i put them myself LIKE : 1,2,3,4).
This is the Query im using for that gets me to an error :
cmd.CommandText = ("SELECT idlcourse, name_of_course FROM tblCOURSE WHERE cathedra =@cathedra AND year=@year"); cmd.Parameters.AddWithValue("@cathedra", comboBox1.Text);
cmd.Parametes.AddWithValue("@year", comboBox2.Text);

PS: YEARS attribute type is Numeric(18).
If someone could sove it for me i would be very thankful.

Answers (3)