Israel

Israel

  • 693
  • 1.3k
  • 219.5k

Rectify this code please

Apr 18 2016 10:23 AM
Hi!
 
I wrote these code to make two filters (the company and year). Means I need to filter any company with the same company's name with the year 'x'. But the code doesnt obey maybe I do a mistake somewhere. These is my codes:
 
...
string commandString = "select top 1 * from Firme where company='" + cbxCompany.Text + " and =year" +txtYear.Text + "' order by BillNumeber desc";
...
}
read.Close();
sqlCon.Close();
 
 

Answers (4)