public static void insertMember(Member m){
		
		try {
			   if(conn == null || conn.isClosed()){
			    conn = DatabaseConnection.getConnection();
			   }
			  } catch (SQLException e1) {
			   // TODO Auto-generated catch block
			   e1.printStackTrace();
			  }
		
		Adress a = m.getAdress();
		try{
			conn.setAutoCommit(false);
			PreparedStatement stmnt = conn.prepareStatement("INSERT INTO Members(name, first_name, book_amount, subscription_date,"
															+ "phone_num, active, subscription_fee, address_id) "
															+ "VALUES(?,?,?,?,?,?,?,?)",PreparedStatement.RETURN_GENERATED_KEYS); 
					
			stmnt.setString(1, m.getName());
			stmnt.setString(2, m.getSurname());
			stmnt.setInt(3, m.getAantalBoeken());
			stmnt.setDate(4, m.getInschrijvingsDatum());
			stmnt.setString(5, m.getTelnr());
			stmnt.setBoolean(6, m.isActief());
			stmnt.setBoolean(7, m.isLidgeld());
			stmnt.setInt(8, a.getAdressID());
			
			stmnt.execute();
			ResultSet keyResultSet = stmnt.getGeneratedKeys();
	        int newMemberId = 0;
	        if (keyResultSet.next()) {
	            newMemberId = (int) keyResultSet.getInt(1);
	            a.setAdressID(newMemberId);
	        }
			conn.commit();
			conn.setAutoCommit(true);
		
		}catch(SQLException e){
			System.out.println("insert fail!! - " + e);
		}
	}