Legent Mady

Legent Mady

  • NA
  • 41
  • 12.8k

C# SQL update query

Mar 13 2017 11:14 PM
 i am using visual studio 2015,
 
update command using sql command
 
string sql = "UPDATE STU set PRESENTEDHOURS=PRESENTEDHOURS + 5,TOTALHOURS=TOTALHOURS + 5 WHERE DEPARTMENT='COMPUTER SCIENCE' AND COURSE='" + comboBox1.Text.ToString() + "' AND YEAR='" + comboBox2.Text.ToString() + "' AND SHIFT='" + comboBox3.Text.ToString() + "'";
 
but updated presented hours and total hours 10 values 
 

Answers (3)