Quote Originariamente inviata da oregon Visualizza il messaggio
Ovvio che hai errori, non hai la minima idea della sintassi

codice:
 private void button2_Click(object sender, EventArgs e)
        {
            string connection = "server=localhost;user id=root;password=LJ4L6BFXMYVX;database=evan";
            string query = "UPDATE presenti  SET presente='" + this.textBox6.Text + "' WHERE idpresenti='" + this.textBox1.Text + "'";
            MySqlConnection conn = new MySqlConnection(connection);
            MySqlCommand cmd = new MySqlCommand(query, conn);
            MySqlDataReader dr;
            conn.Open();
            dr = cmd.ExecuteReader();

           string query2 = "UPDATE  sods SET presente='" + this.textBox6.Text + "' WHERE idsods='" + this.textBox1.Text + "'";
           MySqlCommand cmd2 = new MySqlCommand(query2, conn);
           MySqlDataReader dr2;
           dr2 = cmd2.ExecuteReader();
            
            MessageBox.Show("dati aggiornati con successo!");
            conn.Close();
        }

Si lo avevo premesso nell'introduzione ,forse non hai letto ,comunque grazie che me lo hai ricordato ,nonostante cio' ho risolto

private void button2_Click(object sender, EventArgs e)
{


string connection = "server=localhost;user id=root;password=LJ4L6BFXMYVX;database=evan";
string query = "UPDATE presenti SET presente='" + this.textBox6.Text + "' WHERE idpresenti='" + this.textBox1.Text + "'";
MySqlConnection conn = new MySqlConnection(connection);
MySqlCommand cmd = new MySqlCommand(query, conn);
MySqlDataReader dr;
conn.Open();
dr = cmd.ExecuteReader();
MessageBox.Show("dati aggiornati con successo!");
conn.Close();




string connection1 = "server=localhost;user id=root;password=LJ4L6BFXMYVX;database=evan";
string query1 = "UPDATE sdea SET presente='" + this.textBox6.Text + "' WHERE idsdea='" + this.textBox1.Text + "'";
MySqlConnection conn1 = new MySqlConnection(connection1);
MySqlCommand cmd1 = new MySqlCommand(query1, conn1);
MySqlDataReader dr1;
conn1.Open();
dr1 = cmd1.ExecuteReader();
conn1.Close();


grazie per l'attenzione