public static void updateVille(int id,int idpays, String nom, String cp)throws SQLException
    {
        int result;
        String query;
        try 
        {
            query = "UPDATE VILLE set ID_PAYS=?,VINOM=?,VICP=? WHERE ID_VILLE=? ";
            PreparedStatement pStatement = (PreparedStatement) ConnectionBDD.getInstance().getPreparedStatement(query);
            pStatement.setInt(4, id);
            pStatement.setInt(1, idpays);
            pStatement.setString(2, nom);
            pStatement.setString(3, cp);
            pStatement.executeUpdate();
            
        } 
        catch (SQLException ex) 
        {
            Logger.getLogger(RequetesVille.class.getName()).log(Level.SEVERE, null, ex);
            
        }
       
    }