Home » Developer & Programmer » Forms » How to Create data block using sored procedure in Oracle Forms
How to Create data block using sored procedure in Oracle Forms [message #82085] Sat, 19 April 2003 00:10 Go to next message
Nattu
Messages: 1
Registered: April 2003
Junior Member
Hi ,
Can anyone tell me ,how to Create data block using sored procedure in Oracle Forms?
Re: How to Create data block using sored procedure in Oracle Forms [message #82088 is a reply to message #82085] Sat, 19 April 2003 01:50 Go to previous messageGo to next message
Praveen.B
Messages: 25
Registered: August 2002
Junior Member
When u create data block through wizards it ask for an option whether to create using DB table or Stored Procedure...

try this and get back.......

rgds

praveen
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 Go to previous messageGo to next message
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 #193954 is a reply to message #193927] Wed, 20 September 2006 02:16 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Manual says:

FRM-10764: No argument of type TABLE or REFCURSOR.

Cause: A procedure used to query data for a data block must have one argument of type TABLE or REFCURSOR.

Action: Do one of the following:

1. Select an alternative procedure to query data for your data block.

2. Exit the Data Block Wizard, add an argument of type TABLE or REFCURSOR to the procedure, then re-invoke the wizard.


What do you have as the argument to your procedure?

Try googling it and you may find http://translate.google.com/translate?hl=en&sl=zh-CN&u=http://www.oracle123.com/hgkjh/mrspqtymzm/242302.htm&sa=X&oi=t ranslate&resnum=3&ct=result&prev=/search%3Fq%3DFRM-10764%2B:%2BNo%2Bargument%2Bof%2BType%2BTABLE%2Bor%2BREF%2BCURSOR%26hl %3Den%26lr%3D%26sa%3DX

David
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 Go to previous messageGo to next message
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 Go to previous messageGo to next message
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 have
Argument name      Type      Value
-----------------  --------  ----------
PAR_TABLE          TABLE 
PAR_ID             NUMBER    :emp.empno
etc.
That should do it ...
Re: How to Create data block using sored procedure in Oracle Forms [message #231325 is a reply to message #82085] Mon, 16 April 2007 09:45 Go to previous messageGo to next message
Flyhard
Messages: 21
Registered: April 2007
Location: Germany
Junior Member
Could someone please show an example of how it would work using a refcursor? Or is using a PLSQL table in any way superior?

Thanks
Re: How to Create data block using sored procedure in Oracle Forms [message #231935 is a reply to message #231325] Wed, 18 April 2007 21:04 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Please look at http://www.orafaq.com/forum/m/215769/67467/?srch=refcursor#msg_215769

David
Previous Topic: Form builder by example
Next Topic: Input problem
Goto Forum:
  


Current Time: Thu Sep 26 22:48:08 CDT 2024