ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yee, Richard K CTR DMDC" <Richard.Yee....@osd.pentagon.mil>
Subject RE: How do you call a stored procedure with a single OUT paramete r
Date Wed, 02 May 2007 19:26:39 GMT
Try this:

<parameterMap id="mymap" class="java.util.Map">
        <parameter property="value" mode="OUT" />  </parameterMap>

 <procedure id="getSequence" parameterMap="mymap">
        { call f_gettsid(?) }
 </procedure> 



-----Original Message-----
From: Mark Bleichert [mailto:markbleichert@gmail.com] 
Sent: Wednesday, May 02, 2007 11:54 AM
To: user-java@ibatis.apache.org
Subject: How do you call a stored procedure with a single OUT parameter

I was wondering if you could give me an example of how to call a stored
procedure in ibatis sqlmaps that has no IN parameters and a single OUT
parameter of type varchar.
 
I went through all the mail-archive threads but nothing seemed to work.
 
 
-------------------------------------------------- calling code
----------------------------------------------
 
Map map = new HashMap();
map.put("value", "0");
    
map = (HashMap)queryForObject("getSequence", map);
 
 
-------------------------------------------------- xml mapping
----------------------------------------------

<parameterMap id="mymap" class="java.util.Map">
        <parameter property="value" mode="OUT" />  </parameterMap>

 <procedure id="getSequence" parameterMap="mymap">
        { ? = call f_gettsid }
 </procedure>

Any suggestion to what I am doing wrong ?

 

 


Mime
View raw message