ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JJ Stuart <jjstu...@yahoo.com>
Subject Stored Procedures iBatis version 3 beta
Date Fri, 18 Dec 2009 13:44:57 GMT

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-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Mime
View raw message