ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Butler" <jeffgbut...@gmail.com>
Subject Re: Just Another Stored Procedure Question
Date Wed, 21 Feb 2007 12:55:30 GMT
Yes, also...

- If you use a parameterMap, then use question marks as parameter markers
- Else use parameterClass and the # syntax

You can't use both.

Jeff Butler


On 2/21/07, Brad Handy <brad.handy@gmail.com> wrote:
>
> It seems to me this configuration is the problem:
>
> <procedure id="elions.bas.procCounter" parameterClass="hashMap">
>        {
>         call EKA.SISTEM_KONTROL_SPAJ.GENERATE_COUNTER (
>                  #hasil:varchar#,#msco_number:number#, #lca_id:varchar#,
> #prefix:varchar#,
>                  #suffix:varchar#, #length:number#)
>        }
> </procedure>
>
> You're using the "parameterClass" attribute and trying to reference a "
> parameterMap".  Change the name of the attribute in your <procedure> tag.
>
>
> I'm still just a noob, but that seems like it could be a problem, if not
> the problem.
>
>
>
> Brad
>
>
> On 2/21/07, Yusuf < Yusuf@ekalife.co.id> wrote:
> >
> > Hi,
> > Really2 sorry for asking, i know this has been asked before many times,
> > i have browsed through the docs, the faqs page, and the mailing lists,
> > but i can't seem to make this work (oracle):
> >
> > oracle procedure :
> >
> > PROCEDURE generate_counter (
> >         v_result         OUT      VARCHAR2,
> >       v_msco_number    IN       NUMBER,
> >       v_lca_id         IN       VARCHAR2,
> >       v_prefix         IN       VARCHAR2,
> >       v_suffix         IN       VARCHAR2,
> >       v_total_length   IN       NUMBER
> > );
> >
> > in sqlmap :
> >
> > <parameterMap id="elions.bas.procCounter.param" class="hashMap">
> >         <parameter property="hasil" jdbcType="varchar" javaType="string"
> >
> > mode="OUT"/>
> >         <parameter property="msco_number" jdbcType="number"
> > javaType="int" mode="IN"/>
> >         <parameter property="lca_id" jdbcType="varchar"
> > javaType="string" mode="IN"/>
> >         <parameter property="prefix" jdbcType="varchar"
> > javaType="string" mode="IN"/>
> >         <parameter property="suffix" jdbcType="varchar"
> > javaType="string" mode="IN"/>
> >         <parameter property="length" jdbcType="number" javaType="int"
> > mode="IN"/>
> > </parameterMap>
> >
> > <procedure id="elions.bas.procCounter" parameterClass="hashMap">
> > {call EKA.SISTEM_KONTROL_SPAJ.GENERATE_COUNTER (#hasil:varchar#,
> > #msco_number:number#, #lca_id:varchar#, #prefix:varchar#,
> > #suffix:varchar#, #length:number#)}
> > </procedure>
> >
> > in spring dao :
> >
> > public String selectCounter(int msco_number, String lca_id, String
> > prefix, String suffix, int total_length) {
> >         Map map = new HashMap();
> >         String hasil = "";
> >         map.put("hasil", hasil);
> >         map.put("msco_number", msco_number);
> >         map.put("lca_id", lca_id);
> >         map.put("prefix", prefix);
> >         map.put("suffix", suffix);
> >         map.put("length", total_length);
> >         String result = (String)
> > getSqlMapClientTemplate().queryForObject("elions.bas.procCounter", map
> > );
> >         System.out.println("RESULT = " + result);
> >         System.out.println("HASIL = " + hasil);
> >         return hasil;
> >         }
> >
> > both the String result and hasil contains nothing... can someone help
> > me? thanks
> >
> >
>

Mime
View raw message