CLOSE_ON_ROLLBACK

Specifies whether to close cursors or leave them open for further fetches after a ROLLBACK.

Syntax:

CLOSE_ON_ROLLBACK={YES | NO}

Parameters:

YES
Close cursors on ROLLBACK.
NO
Leave cursors open on ROLLBACK.

Properties:

Default: YES

Scope:

Used at compile time: Yes
Behavior at run time: Process

See Scope - OpenESQL SQL Compiler Directive Options for more information.

Comments:

By default, meaning CLOSE_ON_ROLLBACK is not specified or CLOSE_ON_ROLLBACK=YES is specified, all cursors are closed after a COMMIT.

CLOSE_ON_ROLLBACK works with the BEHAVIOR directive as follows:

BEHAVIOR=UNOPTIMIZED
CLOSE_ON_ROLLBACK is ignored. Cursor selection is least optimal. Cursor remains open after ROLLBACK.

Provides backward compatibility with Net Express.

BEHAVIOR=OPTIMIZED or ANSI, CLOSE_ON_ROLLBACK=YES (default)
Cursor selection is optimal. Cursor is closed after ROLLBACK.
BEHAVIOR=OPTIMIZED or ANSI, CLOSE_ON_ROLLBACK=NO
Cursor selection is optimal. Cursor remains open after ROLLBACK.