|
|
Re: How to Create data block using sored procedure in Oracle Forms [message #193927 is a reply to message #82085] |
Wed, 20 September 2006 00:12 |
vikasg2006
Messages: 80 Registered: March 2006 Location: Dubai
|
Member |
|
|
Hello
can anybody tell me how to create data block by using stored procedure. When we create a data block in D2K by using wizard, it will gives us 2 options. 1. Table or view, and 2. Stored. we always select table or view. but today i select stored procedure and give the name of stored procedure which is store in database, still won't work and error occurs---> "FRM-10764 : No argument of Type TABLE or REFCURSOR.". Can any body help me
thanks
Vikas gupta
|
|
|
|
Re: How to Create data block using sored procedure in Oracle Forms [message #193979 is a reply to message #82085] |
Wed, 20 September 2006 04:33 |
vikasg2006
Messages: 80 Registered: March 2006 Location: Dubai
|
Member |
|
|
" A procedure used to query data for a data block must have one argument of type TABLE or REFCURSOR."
Hy
Thanks for reply. Actually i don't know the concept of " argument of type TABLE or REFCURSOR."
I just create very simple procedure upd_date(mm in number,aa in varchar2) and simple procedure body. This procedure i created in database(8i) and its working fine when i call from SQL or through forms inside PL/SQL code block. My arguments are number and char. Also i try one procedure having no arguments. But it does not open in block wizard. Please tell me what is "Meant by argument of type TABLE or REFCURSOR."
Thanks
Vikas Gupta
|
|
|
Re: How to Create data block using sored procedure in Oracle Forms [message #193981 is a reply to message #193979] |
Wed, 20 September 2006 04:55 |
|
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
For example: create a package. In package specification, create a TYPE which will be the record to be returned by a stored procedure into a form.TYPE oc_record_type IS RECORD(id NUMBER, datum DATE, ...);
TYPE idxby_oc_type IS TABLE OF oc_record_type INDEX BY BINARY INTEGER;
idxby_oc_table idxby_oc_type;
PROCEDURE prc_view
(par_table IN OUT idxby_ocit_type,
par_id IN NUMBER, ...); In the Form Builder, in the Data Block Wizard, choose procedure name and, as arguments, you should haveArgument name Type Value
----------------- -------- ----------
PAR_TABLE TABLE
PAR_ID NUMBER :emp.empno
etc. That should do it ...
|
|
|
|
|