
cursor_variable
is the cursor variable to be allocated.
For more information on this command, see PL/SQL User's Guide and Reference and Programmer's Guide to the Oracle Precompilers.
Example
This partial example illustrates the use of the ALLOCATE command in a Pro*C embedded SQL program:
EXEC SQL BEGIN DECLARE SECTION;
SQL_CURSOR emp_cv;
struct{ ... } emp_rec;
EXEC SQL END DECLARE SECTION;
EXEC SQL ALLOCATE emp_cursor;
EXEC SQL EXECUTE
BEGIN
OPEN :emp_cv FOR SELECT * FROM emp;
END;
END-EXEC;
for (;;)
{EXEC SQL FETCH :emp_cv INTO emp_rec; }
EXECUTE command
FETCH command ![[*]](jump.gif)