Hello.
W2K, DB2 ESE V8.2.1
I created a dummy sql sp that returns 2 result sets.
One of cursors inside it I declared as "with hold with return"
and another as "with return" (without "with hold").
When I call this sp from java application (started under JRE 1.4) that
uses jcc driver (suppose c - Connection object, cs - CallableStatement
object) with c.setAutoCommit(true) and cs declared as
cs = conn.prepareCall
(
"...",
ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_READ_ONLY,
ResultSet.HOLD_CURSORS_OVER_COMMIT
);
I get such results:
1. When I don't use c.commit() after cs.execute() I get these result
sets.
2. When I use c.commit() after cs.execute() I don't get any result
sets.
Question: Is it feature or bug?
When I do the same at OS400 (V5R2) using
"com.ibm.as400.access.AS400JDBCDriver" driver I still get these result
set even after c.commit(). It is strange too because I expect to get
only one (with option "WITH HOLD") result set...
Sincerely,
Mark B.