Product Documentation

FairCom JDBC Developer's Guide

Previous Topic

Next Topic

Scrollable Cursors Within ResultSets

FairCom DB JDBC supports two different scrolling options for ResultSets. The default option is TYPE_FORWARD_ONLY. When a ResultSet is opened with TYPE_FORWARD_ONLY, only forward scrolling cursors are supported. Dharma JDBC also supports TYPE_SCROLL_INSENSITIVE. When a ResultSet is opened with TYPE_SCROLL_INSENSITVE, the cursor can scroll forwards or backwards as well as be positioned using relative or absolute positions. While a scrollable cursor offers greater flexibility, there is a possible performance penalty in that the implementation of the scrollable cursor requires that the entire result set be fetched when the first fetch call is made. With a TYPE_FORWARD_ONLY cursor, the JDBC Driver only fetches a set of rows at a time, and much of the result set may never be fetched if the application does not require it.

CONCUR_READ_ONLY is the only supported concurrency mode.

Improved Scrollable Cursor Support in V11

Scrollable cursor support was introduced in FairCom DB SQL V11. In V11.5, server-side logic and JDBC driver-side logic have been enhanced to include the following support:

  • The methods isBeforeFirst(), isFirst(), isLast(), and isAfterLast() now return appropriate values for an empty resultset.
  • Using a negative value with absolute() is now supported.
  • Wrong results from isBeforeFirst()/isAfterLast() after calls to various positioning functions (next, prev, absolute, relative...) now provide proper results.

These modifications should greatly enhance scrollable cursor usage.

TOCIndex