Re: Forms 4 base tables

From: S. Kannan <skannan_at_cardinal.fs.com>
Date: 1995/08/22
Message-ID: <41dj13$k8a_at_cardinal.fs.com>#1/1


Derek Scherger (dscherger_at_sierrasys.com) wrote:
: Hi folks, in the Oracle Forms 4.0 Motif designer there is an
: option to set the base table for a block to select data from.
: What is the best approach to use if I have several tables that
: I need data from in the same block? Currently we are thinking
: views should be fine, but are there any alternatives, and what
: are their pros and cons?
 

: Thanks!
 

: Derek

Hi Derek,

I am not sure I understood your question. If your doubt is how many base tables a block can have, then the answer is one. Now, if you created views by joining more than one table, you will not be able to insert/update/delete data from this view as the base table (Oracle plans to provide this feature in the future, the grapevine says)

With this background, there are a lot of options.

  1. Have the driving table as a base table. (If there is a driving table)
  2. Define the block as a control block and use KEY- triggers (Forms 3.0) or WHEN-BUTTON-PRESSED (FOrms 4.x) to perform the insert/update/delete. (Not a very elegant solution)
  3. Have a dummy table as a base table. Define a field from this table in page 0 (Forms 3.0) or with a null canvas (forms 4.x) Have an on-validate-record that touches this field. When the user commits, the ON-INSERT, PRE-INSERT, POST-INSERT will fire. Use these triggers to do your processing. In the POST-INSERT trigger, delete the dummy row that would have got added. In the end clear the form. This way you are always working in Insert mode.

Hope this helps.

Regards.

--
---------------------------------------------------------------------------
Kannan 
Email: skannan_at_fs.com
Mastech Systems Corporation

The above are my own comments and opinion. They do not purport that of 
anybody else.
---------------------------------------------------------------------------
Received on Tue Aug 22 1995 - 00:00:00 CEST

Original text of this message