Merhaba GridControl kullanarak tablodaki verilerimi güncellemek istiyorum fakat 'Incorrect syntax near the keyword 'UPDATE''. hatası alıyorum yardımcı olursanız sevinirim!
private void simpleButton13_Click(object sender, EventArgs e)
{
if (baglanti.State == ConnectionState.Closed)
{
baglanti.Open();
SqlCommand cmd = new SqlCommand("INSERT INTO UPDATE List WHERE (NAME,SURNAME,LICENCETYPE,LICENCENUMBER,PHONENUMBER,ADDRESS) VALUES (@NAME,@SURNAME,@LICENCETYPE,@LICENCENUMBER,@PHONENUMBER,@ADDRESS)", baglanti);
cmd.Parameters.AddWithValue("@NAME", textEdit5.Text);
cmd.Parameters.AddWithValue("@SURNAME", textEdit20.Text);
cmd.Parameters.AddWithValue("@LICENCETYPE", comboBoxEdit5.Text);
cmd.Parameters.AddWithValue("@LICENCENUMBER", textEdit23.Text);
cmd.Parameters.AddWithValue("@PHONENUMBER", textEdit24.Text);
cmd.Parameters.AddWithValue("@ADDRESS", textEdit25.Text);
cmd.ExecuteNonQuery();
cmd.Dispose();
baglanti.Close();
listeleme();
textEdit3.ResetText();
textEdit5.ResetText();
textEdit20.ResetText();
comboBoxEdit5.ResetText();
textEdit23.ResetText();
textEdit24.ResetText();
textEdit25.ResetText();
}
}