1
Answer

Unclosed quotation mark after the character string

Violeta Popa

Violeta Popa

11y
5.3k
1
 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)