EXEC SQL begin declare section;
tvi_struct *tvi;
EXEC SQL end declare section;
tvi_struct ss;
tvi=&
$CONNECT TO :testdb@testdb;
sprintf(tvi->;charc.c1,"%s","1111-11-11"
$insert into test1 (r1,r2,r3) values(:tvi->;charc.c1,:tvi->;charc.c1,:tvi->;charc.c1);
}
编译错误:
/usr/informix/bin/esql -D NEW -D INFO -DDEBUG -I/usr/informix/incl/esql
-I/usr/informix/incl/tools -I../include -c -b elf dbtest.ec
esqlc: "dbtest.ec", line 34: Error -33200: Invalid statement on symbol 'tvi_struct'.
esqlc: "dbtest.ec", line 57: Error -33037: 'charc' is not a component of record'tvi'.
2 error(s) found
*** Error code 1 (bu21)作者: fush76 时间: 2003-12-05 08:17 标题: Exec sql include的编译问题 ,郁闷!
main()
{
exec sql include sqlca;
printf("hello.\n");
}
test@test:/u/test>gcc -o a a.c
a.c: In function `main':
a.c:3: error: `exec' undeclared (first use in this function)
a.c:3: error: (Each undeclared identifier is reported only once
a.c:3: error: for each function it appears in.)
a.c:3: error: syntax error before "sql"