db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas <Thomas.K.H...@t-online.de>
Subject Re: *Unrecognized* procedures
Date Fri, 15 Jan 2010 00:20:53 GMT
The problem was the numbering of parameters in the registerOutParameter and the
setxxx Statement:

instead of
CallableStatement cs = conn.prepareCall("{ call APPL.\"myFunction\"(?, ?)");
cs.registerOutParameter(1, java.sql.Types.VARCHAR);
cs.setString(1, parm1);
cs.setString(2, parm2);

CallableStatement cs = conn.prepareCall("{ ? = call APPL.\"myFunction\"(?, ?)");
cs.registerOutParameter(1, java.sql.Types.VARCHAR);
cs.setString(2, parm1);
cs.setString(3, parm2);
was correct/needed.

Unfortunately there was no specific hint in any documentation I read mentioning
aspects of how the numbering needs to be done.

Regards


Mime
View raw message