You might want to check out the new documentation.  The new parameter format
is:  #{param}, not #param#

On Fri, Dec 18, 2009 at 6:44 AM, JJ Stuart <jjstu...@yahoo.com> wrote:

>
> I'm a newbie to iBatis and am currently trying to call a parameterised
> stored
> procedure using v3.5 beta of iBatis.
>
> The following mapping works with a hardcoded value
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE mapper
> PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"
> "http://ibatis.apache.org/dtd/ibatis-3-mapper.dtd";>
> <mapper namespace="test.TestMapper">
>
>
>
>        <select id="selectAll" resultType="LoadStageTest"
> parameterType="java.lang.Integer">
>                        {call test_proc3 (102)}
>                        </select>
> </mapper>
>
>
> However if I then try to pass a value in using below (inline param)
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE mapper
> PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"
> "http://ibatis.apache.org/dtd/ibatis-3-mapper.dtd";>
> <mapper namespace="test.TestMapper">
>
>
>
>        <select id="selectAll" resultType="LoadStageTest"
> parameterType="java.lang.Integer">
>                        {call test_proc3 (#value#)}
>                        </select>
> </mapper>
>
>
> i get the following error
>
> ### Error querying database.  Cause:
> com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an
> error
> in your SQL syntax; check the manual that corresponds to your MySQL server
> version for the right syntax to use near '' at line 1
>
> Any help appreciated,
>
> Many thanks
>
> Jonathan
>
> --
> View this message in context:
> http://old.nabble.com/Stored-Procedures-iBatis-version-3-beta-tp26843638p26843638.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
> For additional commands, e-mail: user-java-h...@ibatis.apache.org
>
>

Reply via email to