set_resultset_holdability(holdability) Method

Controls the behavior of the cursor on commit.

Syntax

cursor.set_resultset_holdability(<holdability>)

Parameters

Recommended Type Name Description
Integer <holdability>

Specifies whether the cursor for a statement is held or rolled back after the transaction is committed. A held cursor is still valid after a commit or rollback, and the application is able to fetch more rows or result sets from it.

Holding cursors, particularly hold over rollback, causes the SAP HANA server to use more resources.

Support for holding a cursor over rollback or over commit and rollback is available in SAP HANA servers beginning with SAP HANA 2.0 SPS 04.

0
CURSOR_HOLD_OVER_COMMIT
1
CURSOR_CLOSE_ON_COMMIT_OR_ROLLBACK
2
CURSOR_HOLD_OVER_ROLLBACK

This value is only supported for SAP HANA.

3
CURSOR_HOLD_OVER_ROLLBACK_AND_COMMIT

This value is only supported for SAP HANA.

Remarks

An exception is raised if there is no connection.