Home » Developer & Programmer » Forms » How to query a block based on a procedure (R12)
How to query a block based on a procedure [message #620122] Tue, 29 July 2014 03:51 Go to next message
cornwall
Messages: 36
Registered: June 2009
Member
Hi,

I have a block based on a procedure. I would like to enable enter query mode to allow any column on the block to be queried. How can this be done?

The only way i can think of is to pass each column as a paremeter to the stored procedure and then re-query the block. Surely there is a more effecient way than this?
Re: How to query a block based on a procedure [message #620126 is a reply to message #620122] Tue, 29 July 2014 05:29 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Consider switching to another data source type (a table or a view); they are much easier to handle.

Anyway: you'll have to populate data block's
  • query data source type = Procedure
  • query data source name = your_procedure_name
  • query data source columns = columns procedure returns (have a look at this message I previously posted)
  • query data source arguments = parameters you pass to the procedure

Querying works as usual: enter query mode, enter search criteria, execute query; Forms will pass items' values to the procedure and return the result.
Re: How to query a block based on a procedure [message #620127 is a reply to message #620126] Tue, 29 July 2014 05:40 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
Which is to say, yes, if you want to use all columns in enter-query mode then you need to pass a parameter for each column.
Re: How to query a block based on a procedure [message #620454 is a reply to message #620127] Fri, 01 August 2014 09:37 Go to previous message
cornwall
Messages: 36
Registered: June 2009
Member
Thanks for your replies. It is an existing form already using a procedure.
I will just add another parameter to the procedure.
Previous Topic: Find and replace contents in MS-Word using Oracle Forms 6i
Next Topic: Positioning an image on XLS file using ole2
Goto Forum:
  


Current Time: Wed Apr 24 06:17:45 CDT 2024