Re: stored procedure

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sun, 20 May 2001 00:49:50 +0200
Message-ID: <tgdu0ec23e0qec_at_beta-news.demon.nl>


"Rafik" <szkolenie_at_szkolenie.waw.pl> wrote in message news:9e6ekv$msd$1_at_news.tpi.pl...
> Hi everyone,
>
> I got a problem with following stored procedure which I put into a
 package.
> I bulit a form on the basis of this procedure and everything is ok BUT
 when
> I try to fetch records (by clicking F8) no records are fetched and form's
> closing itself automatticly.
> I would be apprecieted for any tips in this matter.
> By the way, I am using 8.1.7 and Forms 6i.
>
>
> CREATE OR REPLACE PACKAGE three IS
> TYPE blok_rekord IS RECORD (
> ename emp.ename%TYPE,
> empno emp.empno%TYPE);
> TYPE cur_typ IS REF CURSOR RETURN blok_rekord;
> procedure pytanie(dane IN OUT cur_typ, where_value VARCHAR2);
> END;
>
>
>
> CREATE OR REPLACE PACKAGE BODY three IS
> procedure pytanie(dane IN OUT cur_typ, where_value VARCHAR2) IS
> TYPE cur_typ IS REF CURSOR;
> c cur_typ;
> zm varchar2(1000);
> str varchar2(1000);
> BEGIN
>
> str := 'SELECT empno, ename FROM emp WHERE '|| where_value;
> OPEN c FOR str;
> CLOSE c;
> END;
> END;
>
>
>

Please verify carefully what the definition of a procedure is, and the difference is between a procedure and a function. Can a procedure return a result in a different manner than using an out parameter or an in out parameter?

Regards,

Sybrand Bakker, Oracle DBA Received on Sun May 20 2001 - 00:49:50 CEST

Original text of this message