Releasing Locks at Cursor Close

Include the release_locks_on_close option in the declare cursor syntax , which releases shared cursor locks at isolation levels 2 and 3 when a cursor is closed. Adaptive Server ODBC Driver accordingly supports the release-lock-on-close semantics.

To apply this functionality to all read-only cursors created on an Adaptive Server ODBC Driver connection, set the ReleaseLocksOnCursorClose connection property to 1.

The default ReleaseLocksOnCursorClose value is 0.

Settings applied through the ReleaseLocksOnCursorClose connection property is static and cannot be changed after the connection has been established. This setting takes effect only when connected to a server that supports release_locks_on_close.

See release_locks_on_close in the Adaptive Server Enterprise Reference Manual: Commands.