It depends on the procedure. If the out value points to a refcursor use the
example i wrote a few days ago. But, if the out is just a simple parameter
in the procedure, with the Direction property in the parameter you can get
the value:

<parameterMap id="parameterInsert" class="Colilla">
      <parameter column="P_COLL_ID" property ="Id" direction="Output"/>
      ... other parameters
</parameterMap>

<procedure id="InsertColilla" parameterMap="parameterInsert">
      PAMPKG_COLILLAS.usp_Insert
</procedure>

In this case the procedure insert a record in the table and set the
P_COLL_ID variable as the sequence ID in the insert:


PROCEDURE usp_Insert(
        P_COLL_ID OUT NUMBER,
    ..... the other parameters
) IS
BEGIN
  INSERT INTO PAMT_COLILLAS (
COLL_ID, .... the other columns,...
) values (the ID from sequence, ...the other values from
parameters...) *returning
COLL_ID into P_COLL_ID;*

With this, iBatis then receives P_COLL_ID and set it on the Id property of
the Colilla class.

Don't know how to solve the issue of performance. Perhaps it's slow because
of the cast to a new class for each record, but I'm not sure how you can
optimize it.

Greetings and sorry for my poor English!


On Wed, Jul 22, 2009 at 6:10 AM, Andrew P Chan <andrewnik...@yahoo.com.hk>wrote:

>
> Hi guys,
>
> Thank you for your last help, I have another issue on retrieving Out value
> from the stored procedure.
> I have search around from google, but there are not much example in it.
>
> It seems I have to make ParameterMaps for storing the out value, but I
> dunno
> how? Can someone give me an example of it??
>
> Another question is, if program retrieve 50, 000 to 100, 000 records, using
> iBatis (QueryForList) is very slow, any solution on getting all records
> faster???/
>
> Regards
> Andrew
> --
> View this message in context:
> http://www.nabble.com/Some-Oracle-questions.....-tp24603478p24603478.html
> Sent from the iBATIS - User - Cs mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-cs-unsubscr...@ibatis.apache.org
> For additional commands, e-mail: user-cs-h...@ibatis.apache.org
>
>

Reply via email to