OPTIMIZECURSORS

Optimizes memory consumption when using Oracle, PostgreSQL, DB2, or SQL Server ADO.NET providers. Also applies the same data integrity rules on all databases for embedded SQL cursors that use WITH HOLD and FOR UPDATE clauses for both DBMAN=ODBC and DBMAN=ADO.

Syntax:

OPTIMIZECURSORS={YES|NO}

Parameters:

YES
Optimize cursors. This can result in considerable memory savings and performance gains for large result sets, and also ensures that SQL cursors that use WITH HOLD and FOR UPDATE clauses have appropriate database locks when positioned updates/deletes occur. When used with DBMAN=ADO, this option uses a DataReader (or server cursor) instead of a DataSet if the cursor is FORWARD only.
NO
Provided for backward compatibility. Sets the behavior to that of Visual COBOL versions before 3.0.

Properties:

Default: YES

Dependencies:

To use OPTIMIZECURSORS, you must set DBMAN to either ADO or ODBC explicitly, or by setting an SQL compiler directive option that sets DBMAN to ADO or ODBC implicitly.

Scope:

Used at compile time: Yes
Behavior at run time: Source file

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