Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UDB 7.1 : Calling java stored procedures from another

Status
Not open for further replies.

MartMart

Programmer
Sep 8, 2000
1
GB
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]
 
Hi,
DB2 jdbc doesnt allow one stored procedure to call another if the stored procedures are written in the java programming language. This is a specification and can be found on the DB2 application development guide
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top