1.1.1

Table Of Contents
Note: SQLFire does not support holdable result sets.
Description
Creates a scrollable insensitive cursor with the name of the Identier. The command issues a
createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY) call and then
executes the statement with a java.sql.StatementExecuteQuery request on the value of the String.
If the String is a statement that does not generate a result set, the behavior of the underlying database determines
whether an empty result set or an error is issued. If an error occurs in executing the statement, no cursor is created.
sqlf sets the cursor name using a java.sql.Statement.setCursorName request. Behavior with respect to duplicate
cursor names is controlled by the underlying database. SQLFire does not allow multiple open cursors with the
same name.
Scroll-insensitive result sets are not capable of scrolling. That means the cursor can move in only one direction.
When the result set is open, any change to the database table will not reect.
Unlike Scroll-insensitive, the Scroll-sensitive result set can move the cursor bidirectionally. It also enables the
changes to the database tables when the result set is open. This is the default for sqlf scrollable cursor.
Once a scrollable cursor is created, use the following commands to work with the result set:
absolute on page 435
after last on page 436
before rst on page 438
close on page 438
rst on page 446
last on page 449
next on page 451
previous on page 452
relative on page 454
Example
sqlf(PEERCLIENT)> get with nohold cursor scrollCursor as
'select *
from firsttable';
--another connection performs the following operations.
sqlf> select * from firsttable;
ID |NAME
------------------------
40 |Forty
20 |TWENTY
30 |THIRTY
10 |TEN
50 |Fifty
5 rows selected
sqlf> update firsttable set name='FORTY' where id=40;
1 row inserted/updated/deleted
--the sensitive cursor reflects the update
sqlf(PEERCLIENT)> next scrollCursor;
447
sqlf Interactive Commands