Scrollable cursors
Informix®
Informix SQL and Genero BDL support scrollable
cursors when you specify the
SCROLL
clause in the DECLARE
cursor instruction:DECLARE c1 SCROLL CURSOR FOR SELECT ...
Important:
Informix does not allow to fetch TEXT/BYTE
columns with
scrollable cursors. If you declare a scroll cursor with a SELECT
containing
TEXT/BYTE
columns, Informix will produce the SQL error -611 when executing the
OPEN
instruction.
IBM® DB2®
IBM DB2 supports
native scrollable cursors with the CLI SQL_CURSOR_STATIC
statement attribute.
Solution
The IBM DB2 database
driver uses the native scrollable cursors by setting the CLI statement attribute
SQL_ATTR_CURSOR_TYPE
to SQL_CURSOR_STATIC
.
Important:
With IBM DB2 is it NOT possible to use LOB columns in a scrollable cursor. If TEXT/BYTE
columns are used with a
scrollable cursor, the OPEN
instruction will produce the SQL error -611 (as with Informix).