- 论坛徽章:
- 0
|
BFo800()
{
EXEC SQL BEGIN DECLARE SECTION;
double allamt;
char sqlstr[100];
EXEC SQL END DECLARE SECTION;
double thisamt;
char zh[23];
GetDbl("AMT_2",&thisamt);
GetStr("ACCT_1",zh);
trim(zh);
sprintf(sqlstr,"select sum(q_je) from zz_wklpl%s where q_zh='%s';",fu2tell_f
2_code,zh);
sprintf(sqlstr,"select sum(q_je) from zz_wklpl%s ",fu2tell_f2_code);
EXEC SQL PREPARE wkl FROM :sqlstr;
EXEC SQL EXECUTE wkl INTO :allamt;
return 0;
}
经测EXEC SQL PREPARE wkl FROM :sqlstr;这行SQLCODE为0,
但EXEC SQL EXECUTE wkl INTO :allamt;这行SQLCODE=-518
请教各位大侠,我错哪了? |
|