Hold Cursors

Specifying the HOLD option when you open a cursor keeps the cursor open past the end of the transaction, if the transaction ends in a COMMIT.

A hold cursor does not remain open across a ROLLBACK in which a cursor is opened.

In SAP Sybase IQ, hold cursors can be updated until they are committed. After it is committed, a hold cursor is marked internally as read-only and subsequent positioned updates generate an error.

Although the HOLD option is not commonly used in a DSS environment, it may prove useful in some situations. For example, many existing applications expect to use hold cursors, and some ODBC drivers use hold cursors by default.

SAP Sybase IQ provides the version management needed for hold cursors.

Hold cursors do impact performance. All resources used by the cursor, including memory, disk space, and process threads, are held until the cursor is closed.