ive been trying to update my database. somehow, there is no error for my coding but the data does not updated the value in the database. below were my code
SqlCeConnection conn = new SqlCeConnection("Data Source = Program Files\\PROGRAM\\DATABSE.sdf");
conn.Open();
SqlCeCommand command1 = new SqlCeCommand("Update LOT_ATT SET UPI ='" + txtUPI.Text + "' WHERE HEX_ID = (Select UPI from LOT_ATT Where ID ='" + txtUPI.Text + "'", conn);
SqlCeCommand command2 = new SqlCeCommand("Update LOT_ATT SET NEGERI='" + txtNegeri.Text + "'WHERE HEX_ID = (Select NEGERI from LOT_ATT Where ID ='" + txtUPI.Text + "'", conn);
SqlCeCommand command3 = new SqlCeCommand("Update LOT_ATT SET DAERAH='" + txtDaerah.Text + "'WHERE HEX_ID = (Select DAERAH from LOT_ATT Where ID ='" + txtUPI.Text + "'", conn);
SqlCeCommand command4 = new SqlCeCommand("Update LOT_ATT SET MUKIM ='" + txtMukim.Text + "'WHERE HEX_ID = (Select MUKIM from LOT_ATT Where ID ='" + txtUPI.Text + "'", conn);
SqlCeCommand command5 = new SqlCeCommand("Update LOT_ATT SET LOT ='" + txtLot.Text + "'WHERE HEX_ID= (Select LOT from LOT_ATT Where ID ='" + txtUPI.Text + "'", conn);
SqlCeCommand command6 = new SqlCeCommand("Update LOT_ATT SET AREA='" + txtArea.Text + "'WHERE HEX_ID = (Select AREA from LOT_ATT Where ID ='" + txtUPI.Text + "'", conn);
conn.Close();
MessageBox.Show("Updated!");