ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clough, Samuel \(USPC.PRG.Atlanta\)" <Samuel_Clo...@princetonrg.com>
Subject RE: How to call procedure in oracle package using IBatis.Net.
Date Fri, 21 Sep 2007 12:15:55 GMT
I think we need to see more of your sql map.  All I see is your
procedure name, and we need to see the xml node that the call is defined
in.

I'm also not sure you're using the correct call.  Unless there's an
attribute I'm not aware of, Queryforobject is to read an object from a
result set, not load it from an input/output parameter.

-----Original Message-----
From: pei allen [mailto:allenpei0805@hotmail.com] 
Sent: Friday, September 21, 2007 8:10 AM
To: user-cs@ibatis.apache.org
Subject: How to call procedure in oracle package using IBatis.Net.


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.a
spx&mkt=en-us 
--------------------------------------------------------

Princeton Retirement Group, Inc - Important Terms 
This E-mail is not intended for distribution to, or use by, any person or entity in any location
where such distribution or use would be contrary to law or regulation, or which would subject
Princeton Retirement Group, Inc. or any affiliate to any registration requirement within such
location. 
This E-mail may contain privileged or confidential information or may otherwise be protected
by work product immunity or other legal rules. No confidentiality or privilege is waived or
lost by any mistransmission. Access, copying or re-use of information by non-intended or non-authorized
recipients is prohibited. If you are not an intended recipient of this E-mail, please notify
the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute
any portion of this E-mail. 
The transmission and content of this E-mail cannot be guaranteed to be secure or error-free.
Therefore, we cannot represent that the information in this E-mail is complete, accurate,
uncorrupted, timely or free of viruses, and Princeton Retirement Group, Inc. cannot accept
any liability for E-mails that have been altered in the course of delivery. Princeton Retirement
Group, Inc. reserves the right to monitor, review and retain all electronic communications,
including E-mail, traveling through its networks and systems (subject to and in accordance
with local laws). If any of your details are incorrect or if you no longer wish to receive
mailings such as this by E-mail please contact the sender by reply E-mail. 

--------------------------------------------------------

Mime
View raw message