Specifies whether the clause FOR FETCH ONLY is appended
to READ-ONLY SQL statements.
- db2cli.ini keyword syntax:
- AppendForFetchOnly = 0 | 1
- Default setting:
- The keyword is not set by default. CLI appends the "FOR FETCH ONLY" clause only when connected
to certain server types.
- Equivalent connection attribute:
- SQL_ATTR_APPEND_FOR_FETCH_ONLY
- Usage notes:
- By default, CLI appends the "FOR FETCH ONLY" clause to read SELECT statements
when connected to DB2® for z/OS® or DB2 for i databases.
This keyword allows an application to
control when CLI appends the "FOR FETCH ONLY" clause, for example, in a
situation where an application is binding the CLI packages using different bind BLOCKING options (for example,
BLOCKING UNAMBIG) and wants to suppress the blocking in order to keep
positioned on a given row.
To change the default
CLI behavior, the keyword can be set as follows:
- 0: CLI never appends the "FOR FETCH ONLY" clause to read SELECT
statements regardless of the server type it is connecting to.
- 1: CLI always appends the "FOR FETCH ONLY" clause to read SELECT
statements regardless of the server type it is connecting to.