Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Pro*C/C++ : PCC-S-02201, Encountered the symbol

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

From: Alex Vinokur <alexander.vinokur_at_telrad.co.il>
Date: Wed, 06 Oct 1999 12:51:31 GMT
Message-ID: <7tfgkc$mso$1@nnrp1.deja.com>


In article <7tfake$ijd$1_at_nnrp1.deja.com>,   Alex Vinokur <alexander.vinokur_at_telrad.co.il> wrote:
> 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 ----------------
>

[snip]

I forgot that Pro*C/C++ is not C/C++

I think this code is valid (Pro*C/C++ has no problem with it).



VARCHAR create_table_str [500];

    strcpy((char *)create_table_str.arr, "CREATE TABLE AAA_Table (col1 VARCHAR2(4))");
    create_table_str.len = (unsigned short)strlen((char *)create_table_str.arr);

    puts((char *) create_table_str.arr);     EXEC SQL EXECUTE IMMEDIATE :create_table_str;



Are there another pissibilites to do it?
	Thanks,
	Alex





Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Oct 06 1999 - 07:51:31 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US