Violeta Popa

Violeta Popa

  • NA
  • 137
  • 164.4k

Unclosed quotation mark after the character string

Apr 11 2013 3:32 PM
 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 + "'";
                SqlCommand exec_update_abonat = new SqlCommand(update_abonat, conn);
                exec_update_abonat.ExecuteNonQuery();

Answers (1)