ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pei allen <allenpei0...@hotmail.com>
Subject How to call procedure in oracle package using IBatis.Net.
Date Fri, 21 Sep 2007 12:10:13 GMT

Dear all,
      when i call procedure in oracle package using IBatisNet, it always failed.
      I can call oracle procedre using IBatisNet successfully,but to package 's procedure,
it dosen't work.
      The code like this:

Oracle's Package like below:
**************************************
CREATE OR REPLACE 
PACKAGE allen_pkg
IS

   PROCEDURE ALLEN_TEST (i_input in number,o_result out number) ;
END;
/
CREATE OR REPLACE 
PACKAGE BODY allen_pkg
IS
PROCEDURE ALLEN_TEST (i_input in number,o_result out number) 
IS   
v_seq                  NUMBER;                
BEGIN    
    o_result := i_input;
    return;
END ALLEN_TEST;

END allen_pkg;
***************************************

The SqlMap like below:
*****************************************************

 
	ALLEN_PKG.ALLEN_TEST



	
	    
	    
  	

******************************************************

The Calling function like below:
*****************************************************
public long ProcedureTest()
        {
            Hashtable ht = new Hashtable();
            ht["input"] = 1;
            ht["result"] = 0;
            m_DaoFacade.QueryForObject("ProcedureTestPkg", ht);

            return Convert.ToInt32(ht["result"]);
        }
********************************************************

when run to "m_DaoFacade.QueryForObject("ProcedureTestPkg", ht);", an exception was thrown
like below:
"PLS-00306: wrong number or types of arguments ......"

I use Oracle 10gR2, VS2005 C#, IBatisNet.DataMapper(1.5.1.0)

Thanks!
2007.9.21




_________________________________________________________________
Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us

Mime
View raw message