title: Spring simplejdbc Stored procedure using resultset Extractor
body: <p>I am new to Spring and i'm learning it now. Meanwhile i am stuck at a particular place . i am able to execute the stored procedure but its not returning me any result back .please guide me .I'm using sybase database . The stored procedure contains two parameters one is for the input and the other is the output.</p>
  
  <pre><code>  public String getGetNextIdQuery(String string, String region){
        String custId = ""; 
        JdbcTemplate jtempl  = jdbcTemplateMap.get(region);
  
    Map&lt;String, Object&gt; inParams = new HashMap&lt;String, Object&gt;();
    String nextId = "?";
  
             inParams.put("len", string);
             inParams.put("acct_id",nextId);
  
             SimpleJdbcCall simpleJdbcCall = new SimpleJdbcCall(jtempl).
              withProcedureName("pr_acct_id")
              .withReturnValue()
              .withReturnValue().withoutProcedureColumnMetaDataAccess()
              .declareParameters(new SqlOutParameter("RETURN", java.sql.Types.VARCHAR))
              .declareParameters(new SqlParameter("len", java.sql.Types.SMALLINT))
              .declareParameters(new SqlParameter("acct_id", java.sql.Types.VARCHAR))
            .declareParameters(new SqlReturnResultSet("RESULT", new ResultSetExtractor&lt;String&gt;() {
  
                @Override
                public String extractData(
                              ResultSet arg0)
                                            throws SQLException {
                      String custId = "";
                      int i = 0;                  
                      while(arg0.next()) {  
                         System.out.println(i++);
                         custId = arg0.getString("acct_id");
                       }
  
                return custId;
  
                }
  
          }));                       
             Map&lt;String, Object&gt; result = simpleJdbcCall.execute(inParams);
  
              System.out.println((String)result.get("RESULT"));
  
              custId = (String)result.get("RESULT");
  
           return custId;
  
              }
  </code></pre>