public void printResultSet() {
        if (rs != null) {
            try {
                ResultSetMetaData md = rs.getMetaData();
                for (int i = 1; i <= md.getColumnCount(); i++) {
                    System.out.printf("%-35s\t", md.getColumnName(i));
                }
                System.out.println();
                for (int i = 1; i <= md.getColumnCount(); i++) {
                    System.out.printf("%-35s\t", "------------------------");
                }
                System.out.println();
                while (rs.next()) {
                    for (int i = 1; i <= md.getColumnCount(); i++) {
                        System.out.printf("%-35s\t", rs.getObject(i));
                    }
                    System.out.println();
                }
            } catch (SQLException e) {
                System.out.println("SQLException occured\nError message:" + e.getMessage());
            }

        }
    }