ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yusuf" <Yu...@ekalife.co.id>
Subject Just Another Stored Procedure Question
Date Wed, 21 Feb 2007 10:14:36 GMT
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