Re: Forms 4.5: "Record updated by another user" and more...
Date: 1997/06/28
Message-ID: <qLvuzEAa9LtzEwII_at_erichome.demon.co.uk>#1/1
In article <E1D7EA37_at_MHS>, Stefan.Nilsson_at_ellips.sydkraft.se writes
>
>Hello,
>
>We have a problem regarding Forms 4.5 and Oracle7 Server Release 7.3.2.3.0:
>
>A form is based on a table with a NOT NULL column that holds audit
>information ("createdby"). An insert is done in the form (where the
>audit field is not visible) and "createdby" is set in that record in a
>database trigger. Everything is fine, so long.
>
>But:
>
>The record (still up in the form) is then updated immediately in the
>form which causes the message "Record has been updated by another user"
>to display (since a change was done in the databse trigger) , but the
>update is processed to the database anyway. Is there anyway to avoid
>this message ?
>
>Further:
>
>Since the record in the form does not have any values in "createdby"
>another message is displayed saying "Oracle error - Unable to update
>record, mandatory column is missing". This because Forms try to process
>the record in the form to the database with "createdby"=NULL which is
>not allowed.
This sounds as if your database trigger is doing an explicit UPDATE on
the base table. It shouldn't. Try ...
TRIGGER eric_test_t1
BEFORE INSERT ON eric_test FOR EACH ROW
BEGIN
:new.createdby = user;
END;
If this is the problem, then the 2nd part of your question is solved as
well.
The problem could also be due to EXPLICIT insert/update statements in the Form of this base table. Forms default functionality will handle this & there is usually no need to code these statements yourself.
| ~~~~~~~~~~~~~~~~~~~~ | ERIC HARTZENBERG | ~~~~~~~~~~~~~~~~~~~ | | Email : eric_at_erichome.demon.co.uk | | Homepage : www.erichome.demon.co.uk | |________________________________________________________________|Received on Sat Jun 28 1997 - 00:00:00 CEST