how to develop an available query froms

Posted on 2003-03-26
Medium Priority
Last Modified: 2007-12-19
I want to develop an Available query forms,it support many tables with parameters, and Only need to post one parameter(datablock) .
I design it like this (but it's pity the window diagram model can't put here) the canvas includes two droplist,one for field the other for compare, a text,a text list and three button(add,delete,ok)I want it perform the following task:
1. select the fields name from the droplist ‘field’. The field name comes from the datablock(pass by paramenter)
2. select compare sign from the droplist ‘compare’.
3. input the condition in the ‘result’
4. select “and” or “or” conn sign
WHEN u press the ‘add’ button one record input above will add to the text list. When u press ‘delete’ button a selected record will be deleted from the text tlist. When u press ‘ok’ button it will return a :global.where_clause expression..

The following is a procedure invoke the query forms :
Procedure invoke_query(block_name varchar2) is
Where_clause ,ls_old_sql varchar2(200);
open_forms(query_forms,block_name);//invoke the query forms return :global.where_clause
Where_clause:=add_where_condition(where_clause);//invoke my own function
If :system.cursor_record=0 then
Message(“no record found”)
End if;

pls give me a answer
best regard!
Question by:zhangrui
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2

Expert Comment

ID: 8215530
Personally, I do not understand what are you asking for.
Since there aren't any answers (to yout post) yet, I think nobody else is getting what you want.

Author Comment

ID: 8216735
     my question is how can i get the field name, field type,field display name from the pass paramenter(data block).

Expert Comment

ID: 8217864
If you have datablock name as parameter, you can use
Get_Block_Property('BLOCKNAME', First_Item) to get the name of the first item in the block.
Get_Item_Property('BLOCKNAME.ITEMNAME', NextItem)
will return the name of the next item in the block, etc.
Get_Item_Property('BLOCKNAME.ITEMNAME', Item_Type) returns the type, etc.
Open the online help to look for more properties delivered by Get_Item_Property() built-in function
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

LVL 35

Expert Comment

by:Mark Geerlings
ID: 8220614
If I understand your question correctly, you would like to design an Oracle Form with just one block that can dynamically select from any table, and dynamically select just the columns the user wants at the time.  That may be possible in Oracle Forms, but it certainly is not the way that most people use Oracle Forms.  It also may not be easy, and may cause performance problems, since almost every query will then be different.  This will prevent the Oracle server from being able to re-use SQL statements.

Is this what you are trying to do: design a flexible Oracle Form that can dynamically adjust to select from any table?

Author Comment

ID: 8221345
   That's it.U understand my mean very well.But I don't perform it well.It's only  a design schema(frame) of mine. Give me a hand pls!
LVL 35

Accepted Solution

Mark Geerlings earned 80 total points
ID: 8227172
I do not recommend that approach: a single form that can be changed dynamically at runtime to select from any table, and to optionally select different columns.

I recommend creating a separate form (or at least a separate block) for each table, and choosing the columns that will displayed for each table when the form is designed.  That is the way that most people use Oracle Forms.

Whether you have a separate form for each table, or you have some multi-block forms, that is a design question that will vary with each application.  In some applications it makes sense to have master-detail (or master-detail-detail, etc.) forms that have multiple, related blocks each for a different table.  Oracle Forms handles these very well.

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question