Re: INOUT parameter problem.
I found a similar result.
I think it's a bug. Funny thing is, if you reverse the parameters, and make inputParam INOUT too, it does seem to work --> (slightly modified)
CREATE PROCEDURE demoSp(
INOUT inputParam VARCHAR(255)
,INOUT inOutParam INT
)
BEGIN
DECLARE z INT;
SET z = inOutParam + 1;
SET inOutParam = z;
SELECT inputParam;
SELECT CONCAT('zyxw', inputParam)
into inputParam
;
END
//
<--
java.sql.CallableStatement cStmt = connection.prepareCall("{call test.demoSp(?, ?)}");
cStmt.registerOutParameter("inputParam", java.sql.Types.VARCHAR);
cStmt.registerOutParameter("inOutParam", java.sql.Types.INTEGER);
cStmt.setString("inputParam", "hello");
cStmt.setInt("inOutParam", 4);
cStmt.execute();
System.out.println(cStmt.getString("inputParam"));
System.out.println(cStmt.getInt("inOutParam"));
gives me this output:
zyxw4
5
So maybe it's time to write a bug report. Will you? If not, post back and I will. If you do, post back so i can subscribe.
TIA, roland
Subject
Views
Written By
Posted
6445
December 02, 2005 10:13PM
Re: INOUT parameter problem.
2476
December 03, 2005 07:49AM
4135
December 03, 2005 03:09PM
2246
December 04, 2005 02:15PM
2152
December 04, 2005 08:36PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.