Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public BigDecimal getNumDaysBooked(){
- try{
- Connection conn = null;
- conn = SQL.createConnection(conn, SQL.WOMSDB);
- String query = "SELECT TO_DAYS(ReturnDate) - TO_DAYS(SailDate) from reservations where folio=" + container.getCurrentReservation().getFolio();
- ResultSet RS = null;
- Statement stmt = conn.prepareStatement(query);
- RS = stmt.executeQuery(query);
- /*while (RS.next()) {
- results.add(RS.getString(1));
- }*/
- numDaysBooked = RS.getBigDecimal(1);
- stmt.close();
- SQL.destroyConnection(conn,"getNumDaysBooked");
- }
- catch (Exception ex){
- System.out.println("error initializing numDaysBooked: " + ex.getMessage());
- }
- return numDaysBooked;
- }
Add Comment
Please, Sign In to add comment