Oracle 8 Pro*C cursor problem
From: Mark Heiple <markh_at_xetron.com>
Date: Thu, 15 Mar 2001 16:10:14 -0500
Message-ID: <markh-AF941E.16101415032001_at_news.xetron.com>
END;
END_EXEC; Error at line 95, column 14 in file sample.pc
Date: Thu, 15 Mar 2001 16:10:14 -0500
Message-ID: <markh-AF941E.16101415032001_at_news.xetron.com>
[Quoted] I am trying to use a cursor from inside a Pro*C program and can't get it to compile. I took the cursor sample right out the Oracle docs:
EXEC SQL BEGIN DECLARE SECTION;
SQL_CURSOR emp_cursor;
int dept_num;
EXEC SQL END DECLARE SECTION;
EXEC SQL ALLOCATE :emp_cursor;
EXEC SQL EXECUTE
BEGIN
OPEN :emp_cursor FOR SELECT ENAME FROM emp WHERE deptno = :dept_num;
END;
END_EXEC; Error at line 95, column 14 in file sample.pc
WHERE deptno = :dept_num;
............1
PLS-S-00201, identifier 'EMP' must be declared
Why won't this compile? Why does it think EMP is an identifier? It's not, it is a table. Thanks. Received on Thu Mar 15 2001 - 22:10:14 CET