ASA Programming Guide
Using SQL in Applications
Choosing cursor types
Requesting Adaptive Server Anywhere cursors
To request a cursor from an embedded SQL application, you specify the cursor type on the DECLARE statement. The following table illustrates the cursor sensitivity that is set in response to different requests:
Cursor type | Adaptive Server Anywhere cursor |
---|---|
NO SCROLL | Asensitive |
DYNAMIC SCROLL | Asensitive |
SCROLL | Value-sensitive |
INSENSITIVE | Insensitive |
SENSITIVE | Sensitive |
If an DYNAMIC SCROLL or NO SCROLL cursor is requested as UPDATABLE, then a sensitive or value-sensitive cursor is supplied. It is not guaranteed which of the two is supplied. This uncertainty fits the definition of asensitive behavior.
If an INSENSITIVE cursor is requested as UPDATABLE, then a value-sensitive cursor is supplied.
If a DYNAMIC SCROLL cursor is requested, if the PREFETCH database option is set to OFF, and if the query execution plan involves no work tables, then a sensitive cursor may be supplied. Again, this uncertainty fits the definition of asensitive behavior.