Hi,
I have an application using structures say
typedef struct {
int id;
char value[40];
} MYREC;
When passing a record to a function insert_record( MYREC *pmyrec)
how to deal with the sql-statement regarding the fields of the struct ?
When doing this (TESTPROGRAM) :
exec sql whenever sqlerror sqlprint;
exec sql include sqlca;
exec sql type MYREC is struct {
int id;
char value;
} ;
int main()
{
MYREC mr;
mr.id = 10;
strcpy(mr.value, "testval");
...
Exec sql begin declare section;
MYREC *pmr = &mr;
exec sql end declare section;
EXEC SQL INSERT INTO test VALUES(:pmr->id, :pmr->value);
...
}
I get the message : ERROR: The variable id is not declared
--
Feite Brekeveld
feite(dot)brekeveld(at)osiris-it(dot)nl