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 -> string host variables

string host variables

From: Alex Vinokur <alexander.vinokur_at_telrad.co.il>
Date: Mon, 18 Oct 1999 10:45:49 GMT
Message-ID: <7uetos$as9$1@nnrp1.deja.com>


Hi,

Here are

        pieces of my code and
        my problem description.

        Thanks,
        Alex


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

// ============ Piece#1 ============
EXEC SQL BEGIN DECLARE SECTION;
char *select_col_value="SELECT * FROM FFF";

long    col_value1;
char    col_value2 [15];
char    col_value3 [15];

short   indicator1;

short indicator2;
short indicator3;

EXEC SQL END DECLARE SECTION;

// =================================


// ============ Piece#2 ============
        EXEC SQL FETCH the_cursor INTO
                    :col_value1 INDICATOR :indicator1,
                    :col_value2 INDICATOR :indicator2,
                    :col_value3 INDICATOR :indicator3;
// =================================


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






//#########################################################
//-------------- Problem Description : BEGIN --------------

I would like

        the col_value2 and col_value3 host_variables
        not to depend on size.

        Using the following the col_value2 definition
===========================
RWCString       col_value2;     // Line#111
===========================

        I have got error message :

==================================================
Syntax error at line 111, column 1, file ttt2.pc: Error at line 111, column 1 in file ttt2.pc RWCString col_value2;
1
PCC-S-02201, Encountered the symbol "RWCString" when expecting one of the follow
ing:

   auto, char, const, double, enum, extern, float, int, long,    OCIBFileLocator OCIBlobLocator, OCIClobLocator, OCIDate,    OCINumber, OCIRaw, OCIString, register, short, signed,    sql_context, sql_cursor, static, struct, typedef, union,    unsigned, varchar, void, volatile, a typedef name,    exec oracle, exec, exec sql, exec sql begin, exec sql end,    exec sql type, exec sql var, exec sql include, The symbol "enum," was substituted for "RWCString" to continue.

Error at line 0, column 0 in file ttt2.pc PCC-F-02102, Fatal error while doing C preprocessing


Is there any possibility to gain what I want to? Can OCIString (or another string types) help me to get what I want to?

//-------------- Problem Description : END ----------------




//#########################################################
//------------------- Environment ------------------------- === Oracle 8.0.5 === Pro*C/C++ : Release 8.0.5.0.0 === RogueWave Tools.h++ : 7.0

=== CC: WorkShop Compilers 4.2 30 Oct 1996 C++ 4.2 === SunOS 5.6
//---------------------------------------------------------


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

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Oct 18 1999 - 05:45:49 CDT

Original text of this message

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