Some JDBC drivers generate a cursor name for any SQL query so that a string can always be returned. However, jConnect does not return a name when ResultSet.getCursorName is called, unless you either:
Called setFetchSize or setCursorName on the corresponding Statement, or
Set the SELECT_OPENS_CURSOR connection property to “true,” and your query was in the form of SELECT... FOR UPDATE. For example:
select au_id from authors for update
If you do not call setFetchSize or setCursorName on the corresponding Statement, or set the SELECT_OPENS_CURSOR connection property to “true,” null is returned.
According to the JDBC 2.0 API documentation (see Chapter 11, “Clarifications”), all other SQL statements do not need to open a cursor and return a name.
For more information on how to use cursors in jConnect, see “Using cursors with result sets”.