[ http://issues.apache.org/jira/browse/IBATISNET-140?page=all ] Gilles Bayon closed IBATISNET-140: ----------------------------------
Resolution: Won't Fix use list for question > procedure output parameters do work for oracle provider > ------------------------------------------------------- > > Key: IBATISNET-140 > URL: http://issues.apache.org/jira/browse/IBATISNET-140 > Project: iBatis for .NET > Type: Bug > Components: DataAccess > Versions: DataAccess 1.7 > Environment: windows xp vs .NET C#, Oracle ODP.NET for 10g > Reporter: henry lu > > I tried email swap example and the result with two emails not swaped. > I have my code: > create or replace procedure > ps_swap_email_address (inout_email_1 in out varchar2, inout_email_2 in out > varchar2) > is > tmp_e varchar2(120); > begin > tmp_e := inout_email_1; > inout_email_1 := inout_email_2; > inout_email_2 := tmp_e; > end; > / > <parameterMap id="swap_result" class="System.Collections.Hashtable"> > <parameter property="email_1" column="inout_email_1"/> > <parameter property="email_2" column="inout_email_2"/> > </parameterMap> > <statement id="call_ps_swap_email_address" parameterMap="swap_result"> > call ps_swap_email_address(?,?) > </statement> > string first = "[EMAIL PROTECTED]"; > string second = "[EMAIL PROTECTED]"; > Hashtable map = new Hashtable(); > map.Add("email_1", first); > map.Add("email_2", second); > sqlMapper.QueryForObject("call_ps_swap_email_address", map); > Console.WriteLine("1="+map["email_1"].ToString()); > Console.WriteLine("2="+map["email_2"].ToString()); > But the results didn't swap the email values. > If I change the sqlmap.xml file to: > <parameterMap id="swap_result" class="System.Collections.Hashtable"> > <parameter property="email_1" column="inout_email_1" direction="InputOutput" > /> > <parameter property="email_2" column="inout_email_2" direction="InputOutput" > /> > </parameterMap> > I go the following errors: > Object reference not set to an instance of an object. > at IBatisNet.DataMapper.MappedStatements.MappedStatement.RetrieveOutputParame > ters(RequestScope request, IDalSession session, IDbCommand command, Object > resul > t) > at IBatisNet.DataMapper.MappedStatements.MappedStatement.RunQueryForObject(Re > questScope request, IDalSession session, Object parameterObject, Object > resultOb > ject) > at IBatisNet.DataMapper.MappedStatements.MappedStatement.ExecuteQueryForObjec > t(IDalSession session, Object parameterObject, Object resultObject) > at IBatisNet.DataMapper.MappedStatements.MappedStatement.ExecuteQueryForObjec > t(IDalSession session, Object parameterObject) > at IBatisNet.DataMapper.SqlMapper.QueryForObject(String statementName, Object > parameterObject) > -Henry -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira