Pro*C++: Problem with Pointer to Array of Struct
From: Ullrich Bartels <ullrich.bartels_at_t-online.de>
Date: Wed, 19 Apr 2000 22:54:03 +0200
Message-ID: <38FE1CEB.7952E3F1_at_t-online.de>
Hi,
PCC-S-02322, found undefined indentifier Semantic error at line 12, column 17, file test.pc: exec sql for :n insert into dept values ( :d );
PCC-S-02330, expecting an expression of integer type Semantic error at line 12, column 46, file test.pc: exec sql for :n insert into dept values ( :d );
Date: Wed, 19 Apr 2000 22:54:03 +0200
Message-ID: <38FE1CEB.7952E3F1_at_t-online.de>
Hi,
I tried out the example shown in the "Pro*C/C++ Precompiler Programmer´s [Quoted] Guide, Chapter 12: Using Host Array, Example6: Using a Pointer to an Array of Structs" (pages 12-26/27):
typedef struct dept
{
int deptno;
char dname[15];
char loc[14];
}
void insert_data(d, n)
dept *d;
int n;
{
exec sql for :n insert into dept values ( :d );
}
The PreCompiler gave the following err message:
Semantic error at line 12, column 17, file test.pc: exec sql for :n insert into dept values ( :d );
................1
PCC-S-02322, found undefined indentifier Semantic error at line 12, column 17, file test.pc: exec sql for :n insert into dept values ( :d );
................1
PCC-S-02330, expecting an expression of integer type Semantic error at line 12, column 46, file test.pc: exec sql for :n insert into dept values ( :d );
.............................................1PCC-S-02322, found undefined indentifier
So, has anyone got an idea?
Thx
Ullrich
Received on Wed Apr 19 2000 - 22:54:03 CEST