Hi..i have this code and i get the error: "Incorrect syntax near '58'.
Unclosed quotation mark after the character string ''." The first time worked, then gave me this error. I don't know what's wrong, it seems fine to me. This is my code:
string update_abonat = "UPDATE categorie_discount_adaos SET denumire_categorie='" + textBox1.Text + "', procent='" + textBox3.Text + "', tip_categorie='" + comboBox1.SelectedItem + "WHERE cod_categorie='" + cod_categorie + "'";
string update_abonat = "UPDATE categorie_discount_adaos SET denumire_categorie='" + textBox1.Text + "', procent='" + textBox3.Text + "', tip_categorie='" + comboBox1.SelectedItem + "WHERE cod_categorie='" + cod_categorie + "'";
SqlCommand exec_update_abonat = new SqlCommand(update_abonat, conn);
exec_update_abonat.ExecuteNonQuery();


Javeed M ShaikhRank #839 · 2.7K reputationPosted Apr 11, 2013, 11:54 AM EDT