Re: Forms4.5 Question

From: Richard Hammel <r_hammel_at_mindspring.com>
Date: 1995/08/06
Message-ID: <402mcg$9n2_at_news.mindspring.com>#1/1


In article <3vtsq1$7jq_at_ixnews4.ix.netcom.com>, jhas_at_ix.netcom.com says...
*
*In <zhou.807557127_at_maotai> zhou_at_igd.fhg.de (Zhou Jian) writes:
*
*hi,
*
*I wonder how to modify the FROM clause dynamically, for
*example, in a PRE-QUERY trigger?
*
*In my form application, I have a base table block. When I
*issue a query for this block, the FROM clause contains
*only the base table's name. However, I need to expand
*the Where clause to include a join with other tables
*in a PRE-QUERY trigger. So I have to
*expand the FROM clause accordingly to include tables
*used in join.
*
*Is there any possibility to modify the FROM claus dynamically?
*
*I tried to modify the :System.Last_Query, but was told that this
*system variable can not be modified.
*
*Jian Zhou
*
*Hi,

  • This may Help U.
    *If you know all the tables you need to access , you can change the
    *where clause of block at the runtime using SET_BLOCK_PROPERTY.
    *The property is DEFAULT_WHERE. you can specify your table
    *needs.
    *
    *Swapan Jha
    *jhas_at_ix.netcom.com (USA)

I don't think that is going to help. You cannot add Table references to the Where clause without also adding them to the From clause, and to the best of my knowledge, Forms 4.5 does not allow the developer to change the From clause dynamically at runtime. I don't even think you can change the Base Table for a block at runtime.

Could you possibly use a View as the Base table? Handling DML may be difficult though. But I'm not sure what your application is. You might also consider using a Post-Query trigger to retrieve the information that you want to get. This is the most common method for populating fields which are not related to the Base Table in a block.

If Forms would allow you to change the Base Table, you could use a View during Query processing, and then switch back to the Table afterwards. But, alas, Oracle has not made this possible.

If you do find of a way to dynamically alter the From clause, I would like to know how as well. That could come in handy.

Lotsa luck!

  • Rick
Received on Sun Aug 06 1995 - 00:00:00 CEST

Original text of this message