Re: ProC problem
Date: Fri, 31 Aug 2001 16:23:06 +0200
Message-ID: <h5Nj7.5$P92.268_at_news.ecrc.de>
puma schrieb in Nachricht <9mo0kt$q4812_at_intra09.infocamere.it>...
>
>"Lothar Dickhoff" <dickhofl_at_ada.de> ha scritto nel messaggio
>news:37Lj7.3$P92.141_at_news.ecrc.de...
>>
>> puma schrieb in Nachricht <9mnqhs$q499_at_intra09.infocamere.it>...
>> >Hi all,
>> >I'm facing a problem with a ProC code.
>> >I have this piece of code:
>> >
>> >struct mystruct {
>> > char myfield1[10],
>> > char myfield2[10]
>> >} mypointer;
>> >
>> >EXEC SQL INSERT INTO MYTABLE
>> > VALUES (:mypointer);
>> >
>> >this code is identical to the examples found in documentation...but
>> >precompiler stops in execution beacause mypointer is undefined
>identifier!
>> >Are there some option to pass to precompiler to resolve this problem...
>> >thanks in advance!
>> >
>> >
>> >
>>
>> Hi puma,
>>
>> what´s about:
>> EXEC SQL BEGIN DECLARE SECTION;
>> and
>> EXEC SQL END DECLARE SECTION;
>> ?
>>
>> Regs, Lothar
>>
>Hi Lothar,
>I tried to enclose :
>struct mystruct* mypointer
>inside EXEC SQL BEGIN...etc...etc but it doesn't work!
>what should I include instead?
>
>thanks
>
>
>
Hi puma,
you should enclose the type definition in the SQL declare section as well, otherwise SQL does not know anything about your new defined data type:
EXEC SQL BEGIN DECLARE SECTION;
struct mystruct {
char myfield1[10];
char myfield2[10];
} myvar;
EXEC SQL END DECLARE SECTION;
This should work.
Regs. Lothar Received on Fri Aug 31 2001 - 16:23:06 CEST
