7.5.23 OPEN DESCRIPTOR

Table of Contents Previous Next


7 Reference : 7.5 ECPGPlus Statements : 7.5.23 OPEN DESCRIPTOR

Use the OPEN DESCRIPTOR statement to open a cursor with a SQL descriptor. The syntax is:
EXEC SQL [FOR array_size] OPEN cursor
[USING [SQL] DESCRIPTOR
descriptor_name]
[INTO [SQL] DESCRIPTOR
descriptor_name];
array_size is an integer value or a host variable that contains an integer value specifying the number of rows to fetch. If you omit the FOR clause, the statement is executed once for each member of the array.
cursor is the name of the cursor being opened.
descriptor_name specifies the name of an SQL descriptor (in the form of a single-quoted string literal) or a host variable that contains the name of an SQL descriptor that contains the query that initializes the cursor.
For example, the following statement opens a cursor (named emp_cursor), using the host variable, :employees:

7 Reference : 7.5 ECPGPlus Statements : 7.5.23 OPEN DESCRIPTOR

Table of Contents Previous Next