cmd = new OleDbCommand("update FINAL set STATE_CODE=@STATE_CODE,DAC_CODE=@DAC_CODE,SCHOOL_CODE=@SCHOOL_CODE,STUD_TYPE=@STUD_TYPE,SLNO=@SLNO,NAME=@NAME,CLASS=@CLASS,SECTION=@SECTION,REGNO=@REGNO,OP=@OP,PRI_FLG=@PRI_FLG,SERIAL_GEN_FLG=@SERIAL_GEN_FLG where FILE_NO=" + textBox1.Text.ToString() + "", con);
cmd.Parameters.AddWithValue("@FILE_NO", textBox1.Text);
cmd.Parameters.AddWithValue("@STATE_CODE", textBox2.Text);
cmd.Parameters.AddWithValue("@DAC_CODE", textBox3.Text);
cmd.Parameters.AddWithValue("@SCHOOL_CODE", textBox4.Text);
cmd.Parameters.AddWithValue("@STUD_TYPE", textBox5.Text);
cmd.Parameters.AddWithValue("@SLNO", textBox6.Text);
cmd.Parameters.AddWithValue("@NAME", textBox7.Text);
cmd.Parameters.AddWithValue("@CLASS", textBox8.Text);
cmd.Parameters.AddWithValue("@SECTION", textBox9.Text);
cmd.Parameters.AddWithValue("@REGNO", textBox10.Text);
cmd.Parameters.AddWithValue("@OP", textBox11.Text);
cmd.Parameters.AddWithValue("@PRI_FLG", textBox12.Text);
cmd.Parameters.AddWithValue("@SERIAL_GEN_FLG", textBox13.Text);
int n = cmd.ExecuteNonQuery();
if (n > 0)
{
MessageBox.Show("Record Updated");
}
how to overwrite this error syntax error in update statement in C# .net coding