CursorUpdate

Description

For those interfaces that support it, CursorUpdate specifies whether cursors in your target database are declared read-only or updatable.

Applies to

ASE and SYC SAP Adaptive Server Enterprise

Syntax

CursorUpdate=value

Parameter

Description

value

A number that specifies whether database cursors are declared read-only or updatable. Values are:

  • 0

    (Default) Cursors are declared read-only. SAP Sybase Client Library cursor declarations include the CS_READ_ONLY option.

  • 1

    Cursors are declared updatable. SAP Sybase Client Library cursor declarations include the CS_FOR_UPDATE option. This option applies to all updatable columns in the table.


Default value

CursorUpdate=0

Usage

Set the CursorUpdate parameter to 1 to declare updatable cursors if you plan to use either of the following SQL statements in your application (table represents the table name and cursor represents the cursor name):

DELETE FROM table WHERE CURRENT OF cursor
UPDATE table SET set_clause WHERE CURRENT OF cursor

If you are communicating with the database in a PowerBuilder script, you can reset the CursorUpdate value anytime before or after the Transaction object has connected to the database.

Examples

To specify that database cursors are declared updatable:

  • Database profile

    Select the Cursors Declared Updatable check box on the Transaction page in the Database Profile Setup dialog box.

  • Application

    Type the following in code:

    SQLCA.DBParm="CursorUpdate=1"