C # help error with sqlite

2

Where is the error? does not update at all

SQLiteConnection conn = new SQLiteConnection(conexao);
if (conn.State == ConnectionState.Closed)
      conn.Open();
SQLiteCommand cmd = new SQLiteCommand("UPDATE PESSOAS SET NOME,ADDRESS = @NOME,@ADDRESS  WHERE ID = @CODIGO", conn);
cmd.Parameters.AddWithValue("CODIGO",IDregistro);
cmd.Parameters.AddWithValue("NOME", textBox1.Text);
cmd.Parameters.AddWithValue("ADDRESS", textBox2.Text);
try
{
      cmd.ExecuteNonQuery();
      MessageBox.Show("Registro Atualizado Com sucesso");
    
asked by anonymous 07.08.2017 / 18:08

1 answer

3

Your SQL is wrong , example :

UPDATE PESSOAS SET NOME = @NOME, ADDRESS = @ADDRESS WHERE ID = @CODIGO

Reference SQL UPDATE Statement

    
07.08.2017 / 18:11