[ http://issues.apache.org/jira/browse/IBATIS-173?page=comments#action_12330281 ]
Tony Ugando commented on IBATIS-173: ------------------------------------ Sven, The link that you provided for IBATIS-53 does not help much. First, they are trying to handle multiple resultSets, which is not what I need handled. My problem is that because of the cs.execute(); rs = cs.getResultSet(); call, I am not getting a resultSet back. I do get one however if the cs.execute() was replaced with cs.executeQuery(); and the cs.getResultSet() were omitted. Where can I find some documentation on the use of TypeHandler? I have been looking everywhere for this, but I can't find anything on it. If I am able to obtain the resultSet through the use of TypeHandler, how can I map it back to a resultMap, so that I can take advantage of iBatis mapping the resultSet values to Java Bean properties. Thanks, Tony > Incorrect resultset retrieve when calling stored procedure > ---------------------------------------------------------- > > Key: IBATIS-173 > URL: http://issues.apache.org/jira/browse/IBATIS-173 > Project: iBatis for Java > Type: Bug > Components: SQL Maps > Versions: 2.1.0 > Environment: Windows XP, JDK 1.4.2, Sybase JDBC 2, Sybase 12.5 > Reporter: Phil Wang > > In SqlExecutor.java method:executeQueryProcedure, > ------------------code snippet ----------------------------------------------- > cs.execute(); > rs = cs.getResultSet(); > errorContext.setMoreInfo("Check the results (failed to retrieve > results)."); > handleResults(request, rs, skipResults, maxResults, callback); > -----------------end code snippet --------------------------------------- > The handle to getResultSet is wrong, because the first thing might not be > resultset rather than update count. > You should loop to first real resultset. > A simple fix like this will be helpful: > ------------------------code snippet------------------------------------- > while (!((cs.getMoreResults() == false) && > (cs.getUpdateCount() == -1))) { > ResultSet rs = cs.getResultSet(); > if (rs != null) { > //put result set handler here, if > you want to handle only single resultset, you can jump out from here... > } > } > ----------------------end of code snippet--------------------------------- -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
