Hi All.
After moving to new version of DB2 we faced with strange problem - code that
worked fine with DB2 v7.2.x on DB2 v 8.1 sometimes write error message like
the:
===message===
SQLCODE : -804
SQL0804N The application program parameters for the
current request are not valid. Reason code "107". If a
host variable or SQLVAR in the SQLDA is invalid then: host
variable/SQLVAR number = "6", SQLTYPE = "481", SQLLEN = "8",
host variable/SQLVAR type = "OUTPUT". SQLSTATE=07002
===message===
That code (written on C) is responsible for executing dynamic SQLs.
In general it looks like the:
EXEC SQL PREPARE sql_szExecStmt FROM :sql_szSqlStmt;
// [...]
EXEC SQL DESCRIBE sql_szExecStmt INTO :*SqlDaOut;
// [...]
EXEC SQL DECLARE sql_szExecCursor CURSOR FOR sql_szExecStmt;
// [...]
EXEC SQL OPEN sql_szExecCursor;
// line below is the source of mentioned error ...
EXEC SQL FETCH sql_szExecCursor USING DESCRIPTOR :*SqlDaOut;
// [...]
EXEC SQL CLOSE sql_szExecCursor;
Could you please share some of your experience - what could be the reason of
this error?
Why it worked find on previous version of DB2?
How we can fix it?
With regards,
Dmitry.