cmd.CommandText = "update dbo.diagnosis SET id=" + SetValueForText + "ss=" + sh;
where sh and column ss are of bool datatype and id and SetValueForText are of int datatype.
exception is invalid syntax near ss.
cmd.CommandText = "update dbo.diagnosis SET id=" + SetValueForText + "ss=" + sh;
where sh and column ss are of bool datatype and id and SetValueForText are of int datatype.
exception is invalid syntax near ss.
You're missing a comma between the first value and the second column name. You should also be using a parameterized query to protect against SQL Injection Attacks:
cmd.CommantText =
"update dbo.diagnosis set id=@id, ss=@ss";
cmd.Parameters.Add("@id", SetValueForText);
cmd.Parameters.Add("@ss", sh);
Also keep in mind that you're not filtering any values so this update statement will update every row in the table.