ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albert L. Sapp" <as...@uiuc.edu>
Subject Re: output problem
Date Fri, 23 Jun 2006 13:37:18 GMT
Sorry, engaged fingers before brain.   :-[   I don't think JDBC drivers 
support VARCHAR2, so you do need to use VARCHAR in sqlmap file.  Too 
doggone early in the morning to be going through email.  :-!

Al

puneet arya wrote:

> hi,
>    thx anyway you are right the problem is in the definition of mine 
> output parameters but as you are telling that we can't defined 
> resultMap  attribute in output parameter so i am clearing you we can 
> define.
> i have thrashed out the problem ,, actually IBATIS do not support 
> datatype VARCHAR2 of oracle ,, so i have converted in OUT parameter 
> from VARCHAR2 to VARCHAr and it is running fine now.
> n e ways thx for suggestion.
>  
> Regards,
> Puneet Arya
>
> */Beemsterboer Software <hans@beemsterboer-software.nl>/* wrote:
>
>     Hi,
>
>     The definition of your output parameters is incorrect. The
>     resultMap attribute should not be defined.
>     Please read the documentation or the sql-map.dtd.
>
>     Greetings,
>     Hans.
>
>     puneet arya wrote:
>
>>     Hi,
>>        i have made stored procedure in oracle and try to run the
>>     output in the store procedure through IBATIS. The problem is i am
>>     having two output parameters and i want to execute it in the IBATIS
>>     I am calling my procedure as
>>     <parameterMap id="inputNewRegisterMap" class="newRegisterMap" >
>>     <parameter property="StartDate" jdbcType="VARCHAR2"
>>     javaType="java.lang.String" mode="IN"/>
>>     <parameter property="EndDate" jdbcType="VARCHAR2"
>>     javaType="java.lang.String" mode="IN"/>
>>     <parameter property="lvocode" jdbcType="VARCHAR2" mode="IN"/>
>>     <parameter property="outputnewRegister" jdbcType="ORACLECURSOR"
>>     mode = "OUT" resultMap = "spNewRegister" />
>>     <parameter property="outputResults" jdbcType="VARCHAR2" mode =
>>     "OUT" resultMap = "spNewRegister" />
>>     </parameterMap>
>>     <procedure id="getNewRegistrationList"
>>     parameterMap="inputNewRegisterMap" resultMap = "spNewRegister">
>>     { call SP_NEWREGISTRATION(?, ?, ?, ?, ?) }
>>     </procedure>
>>      
>>     but while implementing it in dao i think i am not able to
>>     implement it properly
>>      
>>     i am defining like
>>      public NewRegistrations[] getNewRegistrationList(ReportRequest
>>     reportRequest)
>>       {
>>              NewRegistrations[] newRegistrations = null;
>>        try
>>        
>>        {
>>          daoManager.startTransaction();
>>          Map newRegisterMap = new HashMap();
>>          newRegisterMap.put("StartDate",reportRequest.getFrmDate());
>>          newRegisterMap.put("EndDate",reportRequest.getToDate());
>>          newRegisterMap.put("lvocode",reportRequest.getLvoCodes());
>>          queryForObject("getNewRegistrationList",newRegisterMap);
>>          ArrayList lstnewRegister = (ArrayList)
>>     newRegisterMap.get("outputnewRegister");
>>             *  lstnewRegister = (ArrayList)
>>     newRegisterMap.get("outputResults");
>>     *       
>>          if(null != lstnewRegister)
>>          {
>>           newRegistrations = new NewRegistrations[lstnewRegister.size()];
>>          }
>>         
>>          for (int index=0; index < lstnewRegister.size(); index++)
>>          {
>>           newRegistrations[index] = (NewRegistrations)
>>     lstnewRegister.get(index);
>>          }
>>        }
>>        finally
>>        {
>>          daoManager.endTransaction();
>>        }
>>        return newRegistrations;
>>      
>>     , i want to define the second  output parameter as i have bold
>>     it.plz suggest
>>                                                                               
>>     Regards,
>>                                                                              
>>     Puneet Arya
>>     ------------------------------------------------------------------------
>>
>
> ------------------------------------------------------------------------
> Yahoo! India Answers: Share what you know. Learn something new Click 
> here 
> <http://us.rd.yahoo.com/mail/in/mailanswersshare/*http://in.answers.yahoo.com/>
> Catch all the FIFA World Cup 2006 action on Yahoo! India Click here 
> <http://us.rd.yahoo.com/mail/in/mailfifa/*http://in.sports.yahoo.com/football/football_fifa.html>





Mime
View raw message