|
|
ALLOCATE CURSOR
Allocates an extended cursor name.
Usage
Description
The value of the extended-cursor-name is associated with the prepared statement specified by the extended-statement-name. Extended cursors and statements differ from "normal" cursors and statements in that they are identified by a host variable or a literal, instead of by an identifier. The host variable must be declared in the DECLARE SECTION of the compilation unit as a character string variable.
The association between the cursor and the statement is preserved until the prepared statement is destroyed, see DEALLOCATE PREPARE, at which time the cursor is also destroyed.
A cursor allocated as REOPENABLE may be opened several times in succession and previous cursor states are saved on a stack, see OPEN. Saved cursor states are restored when the current state is closed, see CLOSE.
A cursor allocated as SCROLL will be a scrollable cursor. For a scrollable cursor, records can be fetched using an orientation specification. See the description of FETCH for a description of how the orientation is specified.
Restrictions
Notes
The extended statement must identify a statement previously prepared in the scope of the extended-statement-name. That prepared statement must be a query expression.
There must be no other extended cursor with the same name allocated in the same compilation unit.
A re-openable cursor can be used to solve the "Parts explosion" problem. Refer to the Mimer SQL Programmer's Manual for a description of this.
Standard Compliance
Standard
Compliance
Comments
X/Open-95 MIMER EXTENSION Support for the ALLOCATE CURSOR statement is a Mimer SQL extension. SQL92 EXTENDED Support for REOPENABLE is a Mimer SQL extension.
|
Upright Database Technology AB Voice: +46 18 780 92 00 Fax: +46 18 780 92 40 dbtechnology@upright.se |
|
|