public void printWriter(String tomorrowDate) //laver en liste over check-ins
    {
        Connection conn = null;
        Statement stmt = null;
        try{
            //Registrer JDBC driver
            Class.forName("oracle.jdbc.driver.OracleDriver");

            //Åben forbindelsen
            conn = DriverManager.getConnection(url, user, pass);

            //Query
            stmt = conn.createStatement();

            rs = stmt.executeQuery("SELECT GUEST.GUESTID, GUEST.GUESTLASTNAME, "
                    + "GUEST.GUESTFIRSTNAME, GUEST.RETURNINGGUEST from "
                    + "GUEST INNER JOIN BOOKROOM ON BOOKROOM.GUESTID=GUEST.GUESTID "
                    + "Where BOOKROOM.DATEFROM = '" + tomorrowDate
                    + "' ORDER BY GUEST.GUESTLASTNAME");
            String guestList = tomorrowDate + " - List of Check-ins.txt";

            try (PrintWriter writer = new PrintWriter(guestList)){

                while (rs.next()){
                    String lastName = rs.getString("GUESTLASTNAME");
                    String firstName = rs.getString("GUESTFIRSTNAME");
                    String guestID = rs.getString("GUESTID");
                    String returningGuest = rs.getString("RETURNINGGUEST");
                    if (returningGuest.equals("Y")){
                        writer.println(lastName + ", " + firstName + " - Guest ID: "
                                + guestID + " (This person is a returning guest)");
                    } else{
                        writer.println(lastName + ", " + firstName + " - Guest ID: "
                                + guestID);
                    }
                }
                writer.close();
            } catch (FileNotFoundException e){
                System.err.println(e);
            }
            rs.close();
        } catch (SQLException se){
            se.printStackTrace();
        } catch (Exception e){
            e.printStackTrace();
        } finally{
            try{
                if (stmt != null){
                    conn.close();
                }
            } catch (SQLException se){
            }
            try{
                if (conn != null){
                    conn.close();
                }
            } catch (SQLException se){
                se.printStackTrace();
            }
        }
    }