Announcement Announcement Module
Collapse
No announcement yet.
Get Stored Prod Return Values? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Get Stored Prod Return Values?

    hi,

    my stored prod returns a list of records, how do i handle the return values? i tried using a rowmapper like in my jdbcTemplate.query methods but i can't get it to work.


    public void executeClientSurveyProcedure(final Date startDate, final Date endDate) {
    List<SqlParameter> declaredParameters = new ArrayList<SqlParameter>();
    declaredParameters.add(new SqlParameter(Types.DATE));
    declaredParameters.add(new SqlParameter(Types.DATE));


    jdbcTemplate.call(new CallableStatementCreator() {

    public CallableStatement createCallableStatement(Connection con) throws SQLException {
    CallableStatement cs = con.prepareCall("{call clientsurvey(?, ?)}");
    cs.setDate(1, new java.sql.Date(startDate.getTime()));
    cs.setDate(2, new java.sql.Date(endDate.getTime()));

    return cs;
    }

    }, declaredParameters);
    }
Working...
X