开发者

How to call stored procedure to read return value and out parameter both in Spring?

I have a stored procedure which returns an Integer as well as an Out Parameter which is of type VARCHAR.

I am using Spring 2.5.6 and unable to find a way to read the return value as well as Out Parameter at the same time.

SimpleJdbcCall.executeFunction(..) have a facility to read the stored procedure return value but no facility for Out Parameter.

SimpleJdbcC开发者_开发技巧all.execute(..) can read Out parameters.

There are other ways also in Spring to do the above.

Am I missing something in Spring which can read both at the same time or the stored procedure is wrong as it should only use Out Param or Return Value but not both at same time?


If you are using Spring 2.5X, I believe that SimpleJdbcCall#withReturnValue() specifies that you want the return value to be included in the return results. I'm not sure what the entry will be keyed to in the Map, but I'd try that out.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜