EXEC SQL FREE :the_cursor & PCC-S-02322
Date: Thu, 14 Oct 1999 14:40:18 GMT
Message-ID: <7u4q0g$m7r$1_at_nnrp1.deja.com>
Hi,
[Quoted] Using the following command line (in Pro*C++ code)
EXEC SQL FREE :sss_cursor; I have got an error message PCC-S-02322, found undefined identifier. 1. What is missing (or wrong) in this code (regarding compilation problems)? [Quoted] 2. Do we have to use EXEC SQL FREE :sss_cursor; if we don't use EXEC SQL ALLOCATE :sss_cursor? Thanks, Alex //#########################################################
//------------------- Pro*C++ code : BEGIN ----------------
//------------
// File zzz.pc
//------------
#include <sqlca.h>
#include <oraca.h>
void foo()
{
EXEC SQL BEGIN DECLARE SECTION;
char *select_sss="SELECT * FROM FFF";
EXEC SQL END DECLARE SECTION;
EXEC SQL PREPARE sss_exec FROM :select_sss; EXEC SQL DECLARE sss_cursor CURSOR FOR sss_exec; EXEC SQL OPEN sss_cursor; EXEC SQL CLOSE sss_cursor; EXEC SQL FREE :sss_cursor; // Line#16
}
//==================================
int main ()
{
return 0;
}
//------------------- Pro*C++ code : END ------------------
//#########################################################
//------------------- Compilation Results : BEGIN ---------
code=cpp
sys_include=(/opt/SUNWspro/SC4.2/include,/opt/SUNWspro/SC4.2/include/CC,/usr/ include,/opt/SUNWspro/RW/workspaces/SOLARIS26/SUNPRO42/7s) code=cpp sys_include=(/opt/SUNWspro/SC4.2/include,/opt/SUNWspro/SC4.2/include/CC,/usr/ include,/opt/SUNWspro/RW/workspaces/SOLARIS26/SUNPRO42/7s) proc code=cppsys_include='(/opt/SUNWspro/SC4.2/include,/opt/SUNWspro/SC4.2/include/CC,/usr /include,/opt/SUNWspro/RW/workspaces/SOLARIS26/SUNPRO42/7s)' iname=zzz LINES=YES CPP_SUFFIX=cpp
Pro*C/C++: Release 8.0.5.0.0 - Production on Thu Oct 14 16:27:48 1999
(c) Copyright 1998 Oracle Corporation. All rights reserved.
System default option values taken from: /home/u01/app/oracle/product/8.0.5/precomp/admin/pcscfg.cfg
Semantic error at line 16, column 17, file zzz.pc:
EXEC SQL FREE :sss_cursor; // Line#16
................1
PCC-S-02322, found undefined identifier
Semantic error at line 16, column 11, file zzz.pc:
EXEC SQL FREE :sss_cursor; // Line#16
..........1
PCC-S-02319, expression type does not match usage
Semantic error at line 16, column 11, file zzz.pc:
EXEC SQL FREE :sss_cursor; // Line#16
..........1
PCC-S-02336, host variable expression has invalid type
make: *** [doit] Error 1
//------------------- Compilation Results : END -----------
//#########################################################
//------------------- System ------------------------------
=== Oracle 8.0.5
=== Pro*C/C++ : Release 8.0.5.0.0
=== SunOS 5.6
//---------------------------------------------------------
//#########################################################
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Oct 14 1999 - 16:40:18 CEST