Re: stored procedure as data source

From: zlotawy <spawnek_at_wp.NO_SPAM.pl>
Date: Sun, 26 Aug 2007 11:30:42 +0200
Message-ID: <farh8v$p5o$1_at_inews.gazeta.pl>


> Not without versions (db *and* developer), and a snippet
> of code, and the *exact* error (copy/paste - not your interpretation)
> - --

Hello,
I have Oracle 10g Expres Edition and Reports 10.

This code works correctly:

PACKAGE package:

    TYPE cursor IS REF CURSOR RETURN record;     PROCEDURE generate(datas IN OUT cursor)

Body:

    PROCEDURE generate(datas IN OUT cursor) is     BEGIN
        OPEN datas FOR SELECT bonus.empno, bonus.ename, job, sal, comm FROM bonus;

    END generate;

But this not:

PACKAGE package:

    PROCEDURE generate(datas IN OUT cursor dupa IN NUMBER); Body:

    PROCEDURE generate(datas IN OUT cursor, new_argument IN NUMBER) IS     BEGIN
        OPEN datas FOR SELECT bonus.empno, bonus.ename, job, sal, comm FROM bonus;

    END generate;

In Report Wizard I set data source as JDBC Query. In form of it I have to write name of procedure.

In first cause I wrote
package.generate
and it was correct.

How to write new verision of procedure (with new_argument)?

package.generate(new_argument => 5) causes error: "wrong number of types of arguments in call to'GENERATE' "

Thanks for every help,
Wojtek Received on Sun Aug 26 2007 - 11:30:42 CEST

Original text of this message