Hi Satish,

IBatis is a very simple tool.  It is just a wrapper on top of the JDBC.  You 
can call it with any
technical name.  It lets to do a lot of things, which otherwise you will have 
to do it yourself.

For Example,
In the normal JDBC assume you had one Input and one Output.  You would do

                        delStmt         = conn.prepareCall("{call 
DeleteCustomer(?, ?)}");      // 2

                        delStmt.setString(1, CustID);
                        delStmt.registerOutParameter(2, OracleTypes.VARCHAR);


So similarly, you have to define both the input and output parameters in IBatis.

Think of ibatis as a wrapper on JDBC and you will be cruising through.

Thanks

Prashanth.


--- "Rao, Satish" <[EMAIL PROTECTED]> wrote:

> 
> I have a stored procedure with 3 IN parameters and 1 OUT parameter. The
> OUT parameter is a REF CURSOR.
> 
> Here's my sqlMap entry:
> 
>       <resultMap id="list-result" class="com.Result">
>               <result property="col1" column="COL1"/>
>               <result property="col2" column="COL2"/>
>               <result property="col3" column="COL3"/>
>       </resultMap>
> 
>       <parameterMap id="proc_param" class="com.Filter">
>               <parameter property="filter1" mode="IN"
> jdbcType="NUMBER" javaType="java.lang.Long"/>
>               <parameter property="filter2" mode="IN"
> jdbcType="VARCHAR" javaType="java.lang.String"/>
>               <parameter property="filter3" mode="IN"
> jdbcType="VARCHAR" javaType="java.lang.String"/>
>       </parameterMap>
> 
>       <procedure id="listResults" parameterMap="proc_param"
> resultMap="list-result">
>               {call Procedure1(?,?,?)}
>       </procedure>
> 
> I get UncategorizedSQLException when I execute the above sqlMap. I am
> not sure what I am doing wrong.
> 
> Questions:
> 2. The table column for filter1 is NUMBER(15), table column for filter2
> is CHAR(1) and the table column for filter3 is VARCHAR2(10). Is my
> jdbcType representation correct?
> 3. I am passing in only 3 IN parameters to Procedure1. Do I need to pass
> in another '?' for OUT parameter?. If yes, do I need to change the
> com.Filter class to have another attribute for the OUT parameter and
> what should be the corresponding java type? I was expecting the OUT
> param to tie into the resultMap.
> 
> Please help.
> 
> Thanks,
> Satish
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to