Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Newbie question - Data blocks and Arguments

Newbie question - Data blocks and Arguments

From: <newbie22_at_my-deja.com>
Date: Mon, 23 Aug 1999 16:31:40 GMT
Message-ID: <7prt1c$9k7$1@nnrp1.deja.com>


HI all,

I'm learning Oracle Dev 2000 at the moment. I'm trying to do some simple things that I did in other GUI interfaces.

Is it possible to create a data block that will accept an argument that will be used in the where clause? I've done this in PLSQL functions and procedures, and in ProC.

So, given the demo database:

SQL> describe DEPT

 Name                            Null?    Type
 ------------------------------- -------- ----
 DEPTNO                          NOT NULL NUMBER(2)
 DNAME                                    VARCHAR2(14)
 LOC                                      VARCHAR2(13)

is it possible to create a data block that would accept the DEPTNO as an argument, and return only those records with that DEPTNO?

In a PLSQL procedure, I would code:

create OR REPLACE procedure some_proc
( a_dept in dept.deptno%type
)
AS

CURSOR C_DEPT is
select
deptno,
dname,
loc
from dept
where deptno = a_deptno;

BEGIN for c1 in c_dept loop
...
end loop;

end; /* END PROC */

(Of course, a procedure such as this, can't 'RETURN' the rows, only process them internally. )

Is is possible to do this same idea in
a DATA BLOCK in Oracle FORMS 5.0?

I've tried fooling around with the data block's arguments, but I have had no success so far. I expect that I have got the syntax wrong.

Thanks a lot,

Newbie

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Mon Aug 23 1999 - 11:31:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US