Friday, May 9, 2008

Spring Framework problem : SqlReturnResultSet() not returned

One more problem with servicemix and spring is in DAO classes, when you make any private static class of StoreProcedure, then in its constructor you must declare SqlReturnResultSet before you declare SqlParameter.Otherwise you will not be able to find return data from StoredProcedure execution.Check the code below,
public MySp(JdbcTemplate jdbcTemplate){
super(jdbcTemplate,"sp_mysp");
declareParameter(new SqlReturnResultSet("strRs",rsMyResultSet));
declareParameter(new SqlReturnResultSet("strRs1",rsMyResultSet1));
declareParameter(new SqlParameter("myId", Types.INTEGER));
compile();
}
so keep in mind while using Spring DAO support.Must declare resultsets first.


0 Comments: