I created a new stored procedure as below

create PROCEDURE SP6 ()
LANGUAGE SQL
------------------------------------------------------------------------
-- SQL Stored Procedure
------------------------------------------------------------------------
BEGIN
update po_emp set emp_name='new employee' where emp_sid=1;
END

I modified spclient.java to execute the above stored procedure. When I try to execute SP6 using db2java.zip (provided as part of db2 client under sqllib\java12 folder), I am not able to read the update count.

CallableStatement callStmt = con.prepareCall("CALL SP6()");
boolean status = callStmt.execute();
//status is false, as it is an update count
if (!status) {
int updateCount = callStmt.getUpdateCount();
//updateCount should be nonnegative value, but it is -1 during execution
if (updateCount == -1) {
System.out.println("No update query issued");
} else {
System.out.println("Update affected : " + updateCount + " rows");
}
}

Let me know if this driver supports returning update counts or not. I found that Merant Driver, supports updateCount but not resultSet.

Please also let me know if there is any driver in the market which supports update counts.