Pro*C/C++ : PCC-S-02201, Encountered the symbol 
Author Message
 Pro*C/C++ : PCC-S-02201, Encountered the symbol

Hi,

I would like to use char[]-variable in EXEC SQL statement :

        EXEC SQL EXECUTE IMMEDIATE variable

However, I have got PCC-S-02201 error.

How to do what I want to?

        Thanks in advance,
        Alex

//#########################################################
//------------------- Pro*C/C++ code : BEGIN --------------

[ --- omitted --- ]

char    string_create_table [1000];
        strcpy (string_create_table, "CREATE TABLE AAA_Table (col1
VARCHAR2(4))");
    EXEC SQL EXECUTE IMMEDIATE string_create_table;     // Line#115

[ --- omitted --- ]

//------------------- Pro*C/C++ code : END ----------------

//#########################################################
//------------------- Compilation Results : BEGIN ---------

proc  iname=demo_create_db

Pro*C/C++: Release 8.0.5.0.0 - Production on Wed Oct 6 12:51:57 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

Syntax error at line 115, column 32, file demo_create_db.pc:
Error at line 115, column 32 in file demo_create_db.pc
    EXEC SQL EXECUTE IMMEDIATE string_create_table;
...............................1
PCC-S-02201, Encountered the symbol "string_create_table" when expecting
one of
the following:

   : a quoted string, a numeric constant, close, commit,
   connect, describe, execute, fetch, open, prepare, rollback,
   select, alter, audit, comment, create, delete, drop, grant,
   insert, lock, noaudit, rename, revoke, set, update, validate,
   allocate, cache, context, enable, free, object, savepoint,
   analyze, explain, truncate,
The symbol ":" was substituted for "string_create_table" to continue.

Error at line 0, column 0 in file demo_create_db.pc
PCC-F-02102, Fatal error while doing C preprocessing
make: *** [demo_create_db.o] Error 1

//------------------- Compilation Results : END -----------

//#########################################################
//------------------- Database, Compiler, System  ---------

=== Oracle 8.0.5
=== Pro*C/C++
=== SunOS 5.6
=== /usr/ucb/cc: cc.sh   1.15    95/05/03 SMI

//---------------------------------------------------------

//#########################################################

Sent via Deja.com http://www.***.com/
Before you buy.



Sun, 24 Mar 2002 03:00:00 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. Pro*C/C++ : PCC-S-02201, Encountered the symbol

2. PCC-S-02201 when template variable in DECLARE SECTION

3. PCC-S-02201 when template variable in DECLARE SECTION

4. Duplicate sqlca symbol error in Pro*C++

5. Free Pro*C++ Guide - Essential Pro*C++ (for first 100 replies )

6. Filter for IIS log file cs(User-Agent)

7. collate in SQL server (value CS/table CI)

8. pgsql/src/bin/psql nls.mk cs.po

9. CS Apps : TTable or TQuery ?

10. Problem with Delphi3 CS and Sybase 11 - HELP please

11. kcip@cs.cuhk.hk

12. Delphi 2.0 CS Update & BLOB Problem


 
Powered by phpBB® Forum Software