I have two Java stored procedures using JDBC but get problems when I call the 2nd from the 1st. I am using JDBC statement syntax as follows
rs = stmt.executeQuery();
// Use query results to migrate products
callSQL = "{call au_migrate_product(?,?)}";
while (rs.next())
{
v_code_fiche = rs.getInt("CODE_FICHE"
;
stmt2 = con.prepareCall(callSQL);
stmt2.setInt(1, v_code_fiche);
stmt2.setInt(2, i_newstatus);
stmt2.execute();
}
The execute fails with
[IBM][CLI Driver][DB2/LINUX] SQL0751N User defined function or procedure "" (specific name ""
attempted to execute a statement that is not allowed.
Any clues? [sig][/sig]
rs = stmt.executeQuery();
// Use query results to migrate products
callSQL = "{call au_migrate_product(?,?)}";
while (rs.next())
{
v_code_fiche = rs.getInt("CODE_FICHE"
stmt2 = con.prepareCall(callSQL);
stmt2.setInt(1, v_code_fiche);
stmt2.setInt(2, i_newstatus);
stmt2.execute();
}
The execute fails with
[IBM][CLI Driver][DB2/LINUX] SQL0751N User defined function or procedure "" (specific name ""
Any clues? [sig][/sig]