Previous Topic Next topic Print topic


DESCRIBE CURSOR

The DESCRIBE CURSOR statement gets information about the result set that is associated with the cursor. The information, such as column information, is put into a descriptor. Use DESCRIBE CURSOR for result set cursors from stored procedures. The cursor must be defined with the ALLOCATE CURSOR statement.

Invocation

This statement can be embedded in an application program only. It is an executable statement that cannot be dynamically prepared.

Authorization

No authorization is required for this statement.

Syntax

DESCRIBE CURSOR {cursor-name | host-variable} 
    INTO descriptor-name

Parameters:

cursor- name Indentifies a cursor by the specified cursor name. The name must identify a cursor that has already been allocated in the source program.
host-variable Indentifies a cursor by the cursor name contained in the host variable. The name must identify a cursor that has already been allocated in the source program.
descriptor-name Identifies an SQL descriptor area (SQLDA). The information returned in the SQLDA describes the columns in the result set associated with the named cursor.
Note:

For the statement to execute successfully, the application program must be connected to the site at which the stored procedure was executed.

Previous Topic Next topic Print topic