Re: Forms 4.5: "Record updated by another user" and more...

From: Steve Cosner <stevec_at_zimmer.csufresno.edu>
Date: 1997/06/27
Message-ID: <5p0lvn$oj3_at_info.csufresno.edu>#1/1


In article <E1D7EA37_at_MHS>, <Stefan.Nilsson_at_ellips.sydkraft.se> wrote:
>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.
>
>Could someone sort this out for me please. Is there anyway to avoid
>these errors ?
>
>Does anyone know how it works on Forms 5.0 or a later version of Oracle
>database ?

To avoid the "updated by another user" message, you should re-query the block after you commit, in order to pick up the changes made by the database trigger.

To avoid the problem with the not-null item, since it is not displayed on your form, you could delete it from the form. Or else set it to a non-null value before any insert/update since your database trigger will be changing it anyway.

And I doubt that any of this will change in a future release.

Regards,
Steve Cosner



http://members.aol.com/stevec5088
QA: Dynamic browse & update utility form available (upgraded to version 0.7e 05-May-1997) Received on Fri Jun 27 1997 - 00:00:00 CEST

Original text of this message