Monday, March 12, 2012

Frm-40654

I have a form where I handle inserts in the on-insert
trigger. whenever I save a record and try to change a field afterwards, it gives the following error. It
wouldn't let me make any changes.

FRM-40654 record has been updated by another user. Re-query to see
change.

It seems to me that the trigger cannot commit the changes I make. I try
to write commit_form but it didn't like it. Any suggestions to fix this.

ThanksWhat it looks like your trying to do is insert into another table at the
same time as your form is writing to another table. Typically, for
this type of action, a "pre" or "post" trigger is used (preferable in this
case, a "post-insert" trigger.

The "pre" is typically used to obtain other column values that you
previously havent'y collected yet in the table your block will be
writing to, such as the "key value" from a sequence.

If you use a "post-insert" trigger, you may also want to post your
results before you perform your insert. Then, if the post is successful,
insert your results to the other table.

No comments:

Post a Comment