Hi everyone!
I am using the following code to insert data into a table called 'callreference'
cmd = new SqlCommand("insert into callreference (cat1,pd1,q1,vendor1,pi1,idate1) values ('" + comboBox9.Text + "','" + textBox3.Text + "','" + textBox5.Text + "','" + comboBox1.Text +"','" + textBox7.Text + "','" + dateTimePicker2.Text + "' where callref = '"+textBox1.Text+"')", con);
cmd.ExecuteNonQuery();
The attribute callref used with where clause is already present in the table.
and I am getting the exception :- Incorrect syntax near the keyword 'where'.
Why is this so?
kindly help! thanks!