Re: help!: Views in Forms

From: dfg <rebeliscool_at_wowmail.com>
Date: 26 Sep 2001 22:22:01 -0700
Message-ID: <abf50112.0109262122.26cb2f8f_at_posting.google.com>


Thank you Jerry and other folks,

I really appretiate your answers, but sorry, it was my mistake.

I forgot about a trigger that makes a key sequence in the master table. It was a primary reason for all the errors, I simply have to re-query the master table just after insert. However I had to refuse the view and use a table instead as I need ROWID to perform re-query.

Jerry, will keep your notes for future reference.

Thanks again and best regards.

"Jerry Alan Braga" <jabraga_at_flanagan.ca> wrote in message news:<OYjs7.32153$Z2.460182_at_nnrp1.uunet.ca>...
> 1. if you DML target is the view itself then the view must be 1-1 with the
> table. You cannot insert/update/delete thru a view of multiple tables.
>
> 2. If you wish to read from a view an update a table then set the DML
> DataSource to the view, DML Target to the table and set the COUNTRYNAME
> column to QUERYONLY "YES". This will allow reading from but not
> insert/updating to.
>
> 3.should in your view you not be joining the coutry ID's together, this way
> you will get a cartesian product or all you allowing the same plant ID in
> mutiple country ID's ?
>
> 4 Being that you calling another form from the first, ensure that you have
> Refresh turned on in you LOV properties, or you will never see the result of
> the new country in the LOV. Also by calling another form (unless you
> specify open_form with session) your transaction scope is for both the
> caller and calling form. Therefore when you save changes in the called form
> you will also be saving the pending changes in the caller form. This can
> also cause problems.
>
> NOTE: I did not think that Forms 6i was certified against 7.3.4 but I could
> be mistaken.
>
> "dfg" <rebeliscool_at_wowmail.com> wrote in message
> news:abf50112.0109260211.12e4dc07_at_posting.google.com...
> > Hi,
> >
> > I faced a problem using views in Forms 6i
> > Hope somebody can help me to resolve it
> >
> > I cannot insert records in the view if one of it tables
> > got new records.
> >
> > Suppose I have two tables PLANT and COUNTRY.
> > PLANT references COUNTRY:
> >
> > COUNTRY
> > ( ID INTEGER
> > NAME VARCHAR2(40));
> >
> > PLANT
> > ( ID INTEGER,
> > NAME VARCHAR2(40),
> > CID REFERENCES COUNTRY );
> >
> > I found it useful to create a plant view that contains country name
> > instead of country id:
> >
> > CREATE VIEW VPLANT AS SELECT P.ID, P.NAME, C.ID as CID, C.NAME as
> COUNTRYNAME
> > FROM PLANT P, COUNTRY C;
> >
> > Then I create a form that happily displays plants from the view.
> > And I'm using LOV to select country when inserting new plant data.
> >
> > NOW!
> > If I have no necessary country in the LOV I use another form to
> > create a new country record.
> > Then I see the necessary country in the LOV, but cannot insert
> > the new record in the view!
> >
> > With one of the following errors:
> > FRM-40502 (in dependant table)
> > FRM-40654 (in main table)
> >
> > Thank you for any suggestion.
> >
> > I'm using Forms 6i and Oracle 7.3.4
Received on Thu Sep 27 2001 - 07:22:01 CEST

Original text of this message