You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Bhaarat Sharma <bh...@gmail.com> on 2009/05/04 21:33:49 UTC

how can i add an input parameter to this example

I am trying to mold my code so it works with oracle stored procedures. The
SP will return multiple resultsets (cursors) and will also take in a
parameter.
I was looking at the following example on the wiki.

http://opensource.atlassian.com/confluence/oss/pages/viewpage.action?pageId=5653

I have two questions:

 - How can I mold this example so that if SP is expecting 1 input parameter
then the code should work.
 I did the following:

changed { ? = call refs_pck.get_refs } TO { ? = call refs_pck.get_refs (?)}

The above does not seem to work

I get the following error:

Caused by: java.sql.SQLException: ORA-06550: line 1, column 13: PLS-00306:
wrong number or types of arguments in call to 'GET_REFS' ORA-06550: line 1,
column 7: PL/SQL: Statement ignored

- After the above works...how can i change it so that it can be used when
stored procs return multiple resultsets.  Because '? = XXX' means it is
taking care of just one result set.

Thanks!

Re: how can i add an input parameter to this example

Posted by Sundar Sankar <fa...@gmail.com>.
As far as I know, U cant do multiple cursor returns with Ibatis. I remember
having tried it way before and was unsuccessful. Am not sure if the later
versions have them.

-Sundar

On Mon, May 4, 2009 at 12:33 PM, Bhaarat Sharma <bh...@gmail.com> wrote:

> I am trying to mold my code so it works with oracle stored procedures. The
> SP will return multiple resultsets (cursors) and will also take in a
> parameter.
> I was looking at the following example on the wiki.
>
>
> http://opensource.atlassian.com/confluence/oss/pages/viewpage.action?pageId=5653
>
> I have two questions:
>
>  - How can I mold this example so that if SP is expecting 1 input parameter
> then the code should work.
>  I did the following:
>
> changed { ? = call refs_pck.get_refs } TO { ? = call refs_pck.get_refs
> (?)}
>
> The above does not seem to work
>
> I get the following error:
>
> Caused by: java.sql.SQLException: ORA-06550: line 1, column 13: PLS-00306:
> wrong number or types of arguments in call to 'GET_REFS' ORA-06550: line 1,
> column 7: PL/SQL: Statement ignored
>
> - After the above works...how can i change it so that it can be used when
> stored procs return multiple resultsets.  Because '? = XXX' means it is
> taking care of just one result set.
>
> Thanks!
>
>

Re: how can i add an input parameter to this example

Posted by Chema <de...@gmail.com>.
Could you paste parameterMap definition ?


2009/5/4 Bhaarat Sharma <bh...@gmail.com>:
> I am trying to mold my code so it works with oracle stored procedures. The
> SP will return multiple resultsets (cursors) and will also take in a
> parameter.
> I was looking at the following example on the wiki.
> http://opensource.atlassian.com/confluence/oss/pages/viewpage.action?pageId=5653
>
> I have two questions:
>  - How can I mold this example so that if SP is expecting 1 input parameter
> then the code should work.
>  I did the following:
>
> changed { ? = call refs_pck.get_refs } TO { ? = call refs_pck.get_refs (?)}
> The above does not seem to work
>
> I get the following error:
> Caused by: java.sql.SQLException: ORA-06550: line 1, column 13: PLS-00306:
> wrong number or types of arguments in call to 'GET_REFS' ORA-06550: line 1,
> column 7: PL/SQL: Statement ignored
>
> - After the above works...how can i change it so that it can be used when
> stored procs return multiple resultsets.  Because '? = XXX' means it is
> taking care of just one result set.
> Thanks!
>