You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Clinton Begin (JIRA)" <ib...@incubator.apache.org> on 2005/06/25 07:19:58 UTC

[jira] Closed: (IBATIS-146) ProcedureStatement does not follow JDBC spec for processing result sets

     [ http://issues.apache.org/jira/browse/IBATIS-146?page=all ]
     
Clinton Begin closed IBATIS-146:
--------------------------------

    Fix Version: 2.1.5
     Resolution: Fixed
      Assign To: Clinton Begin

Fixed as described.

> ProcedureStatement does not follow JDBC spec for processing result sets
> -----------------------------------------------------------------------
>
>          Key: IBATIS-146
>          URL: http://issues.apache.org/jira/browse/IBATIS-146
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.0.9b
>     Reporter: John Didion
>     Assignee: Clinton Begin
>      Fix For: 2.1.5

>
> CallableStatement API documentation: "For maximum portability, a call's ResultSet objects and update counts should be processed prior to getting the values of output parameters".
> The problem occurrs when calling SqlExecutor.executeQueryProcedure() on a stored procedure that returns at least one result set as well as output parameters. Some drivers handle this fine, but a driver coded to the letter of the JDBC spec will not.  The code should look something like this:
> <pre>
> errorContext.setMoreInfo("Check the statement (update procedure failed).");
> rs = cs.executeQuery();
> errorContext.setMoreInfo("Check the results (failed to retrieve results).");
> handleResults(request, rs, skipResults, maxResults, callback);
> // consume additional results
> while (cs.getMoreResults());
> errorContext.setMoreInfo("Check the output parameters (retrieval of output parameters failed).");
> retrieveOutputParameters(cs, mappings, parameters);
> </pre>
> If you want to test this, try using the jTDS driver.

-- 
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