1.0

Table Of Contents
scroller.getString("SALES_PERSON"));
} else {
System.out.println("There are no rows.");
}
scroller.beforeFirst();
scroller.afterLast(); // By calling afterlast(), all rows will be
materialized
scroller.absolute(3);
if (!scroller.isAfterLast()) {
System.out.println("The employee with the third highest number " +
"of sales is " +
scroller.getString("SALES_PERSON") + ", with " +
scroller.getInt("SALES") + " sales");
}
if (scroller.isLast()) {
System.out.println("There are only three rows.");
}
if (scroller.last()) {
System.out.println("The least highest number " +
"of sales of the top three sales is: " +
scroller.getInt("SALES"));
}
scroller.close();
s4.close();
conn.commit()
conn.close();
System.out.println("Closed connection");
Result Sets and Autocommit
Except for the result sets associated with holdable cursors, issuing a commit causes all result sets on your
connection to be closed.
A JDBC application is not required to have autocommit off when using update methods on an updatable result
set, even if the result set is not holdable. Positioned updates and deletes cannot be used in combination with
autocommit and non-holdable result sets.
Holdable Result Sets
A holdable result set enables an application to keep result sets open after implicit or explicit commits. By default,
the cursor controlled by a holdable result set is held open after a commit.
Note: SQLFire also supports non-holdable result sets.
When you create a statement, you can specify that the result set will be automatically closed when a commit
occurs. Result sets are automatically closed when a transaction aborts, regardless of whether they have been
specied to be held open.
To specify whether a result set should be held open after a commit takes place, supply one of the following
ResultSet parameters to the Connection method createStatement , prepareStatement , or
prepareCall :
CLOSE_CURSORS_AT_COMMIT
Result sets are closed when an implicit or explicit commit is performed.
HOLD_CURSORS_OVER_COMMIT
Result sets are held open when a commit is performed, implicitly or explicitly. This is the default behavior.
vFabric SQLFire User's Guide168
Developing Applications with SQLFire