[ http://issues.apache.org/jira/browse/IBATIS-107?page=all ]
Brandon Goodin updated IBATIS-107:
----------------------------------
Component: SQL Maps
> call stored procedure with parameterClass instead of parameterMap
> -----------------------------------------------------------------
>
> Key: IBATIS-107
> URL: http://issues.apache.org/jira/browse/IBATIS-107
> Project: iBatis for Java
> Type: Bug
> Components: SQL Maps
> Versions: 2.0.9b
> Environment: linux 2.4.22, sun java 1.4.2_07, Microsoft SQL Server 2000, MS
> JDBC Driver SP1
> Reporter: Brian Zhou
>
> Trying to call the stored procedure byroyalty in the pubs sample database
> that comes with SQL Server.
> The following SQL statement and procedure call with parameterMap works
> <select id="select-royalty" resultClass="string" parameterClass="int">
> select au_id from titleauthor where royaltyper = #value#
> </select>
> <parameterMap id="pmap1" class="map">
> <parameter property="percentage" jdbcType="INTEGER"
> javaType="java.lang.Integer" mode="IN" />
> </parameterMap>
> <procedure id="sp-byroyalty" resultClass="string" parameterMap="pmap1">
> {call byroyalty(?)}
> </procedure>
> But calling it with parameterClass (either int or java.lang.Integer)
> <procedure id="sp1-byroyalty" resultClass="string" parameterClass="int">
> {call byroyalty(?)}
> </procedure>
> give me the following error:
> com.ibatis.common.jdbc.exception.NestedSQLException:
> com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in conf/sql-map.xml.
> --- The error occurred while applying a parameter map.
> --- Check the sp1-byroyalty-InlineParameterMap.
> --- Check the statement (update procedure failed).
> --- Cause: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
> JDBC]Invalid parameter binding(s).
> Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
> JDBC]Invalid parameter binding(s).
--
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