Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

CursorType – PB Docs 126 – PowerBuilder Library

CursorType – PB Docs 126

CursorType database parameter

Description

Supports the scrollable cursor feature introduced in Adaptive
Server Enterprise 15.0, including directional scrolling (forwards
and backwards) and sensitivity towards independent changes to table.

Controls

  • ASE, SYC SAP Adaptive
    Server Enterprise (15.0 and later)

Syntax

Parameter

Description

value

A string that specifies whether database
cursors are scrollable and whether they are sensitive to modifications
in data. Values are:

  • NonScrollable

    (Default) Non-scrollable forward-only cursor. Supports the
    PowerScript FETCH NEXT syntax.

  • ScrollInsensitive

    Scrollable insensitive cursor that ignores any data modifications
    when scrolling in either direction. Supports the PowerScript FETCH
    NEXT, FETCH PRIOR, FETCH FIRST
    , and FETCH LAST syntaxes.

  • ScrollSemiSensitive

    Scrollable semi-sensitive cursor that presents data modifications
    when scrolling forwards but ignores them when scrolling backwards.
    Supports the PowerScript FETCH NEXT, FETCH PRIOR, FETCH
    FIRST
    , and FETCH LAST syntaxes.

Default

CursorType=’NonScrollable’

Usage

Adaptive Server Enterprise 15.0 allows both scrollable and
nonscrollable cursors, which can be either semi-sensitive or insensitive. “Scrollable” means that
you can scroll through the cursor result set by fetching any, or
many, rows, rather than one row at a time; you can also scan the
result set repeatedly. A scrollable cursor allows you to set the
position of the cursor anywhere in the cursor result set for as
long as the cursor is open.To use a scrollable cursor, you must
use a DECLARE CursorName CURSOR SQL statement to declare it with
a suitable SELECT statement, such as the PowerBuilder
Dynamic SQL Format 3 and Dynamic SQL Format 4 statements, and you
must have the query engine provided in Adaptive Server 15.0 or later.

For sensitive scrolling to work correctly, the table must
have a clustered index or a clustered unique constraint, such as
a clustered primary key.

All scrollable cursors are read-only and can only be used
when the value of the CursorUpdate database parameter is 0 (the
default). If you need an updatable cursor, set the CursorUpdate
parameter to 1. When CursorUpdate is set to 1, the value of CursorType
is ignored. All update cursors are nonscrollable.

If a scrollable cursor is moved to a position before the first
row or after the last row, SQLCA.SQLCode returns
100 and no data is returned. However, users can continue to fetch
data by using a suitable FETCH statement after
receiving this SQLCode value.

Both client and server must be Adaptive Server 15.0 or higher.

Examples

To specify support for semi-sensitive scrollable
cursors (data modifications are presented when scrolling forwards):

  • Database profile

    Select Cursor Scrollable SemiSensitive from the Read Only
    Cursor Type drop-down list on the Transaction page in the Database Profile
    Setup dialog box.

  • Application

    Type the following in code:

See Also

CursorUpdate


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x