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.
If someone could sove it for me i would be very thankful.

Jignesh TrivediRank #16 · 50.3K reputationPosted Dec 5, 2013, 10:34 PM EST
your code look ok.
Are you getting any error?
can you please share what problem your are facing...
Jasmin M8 reputationPosted Dec 6, 2013, 12:42 AM EST
Jasmin M8 reputationPosted Dec 6, 2013, 12:44 AM EST