Re: Forms 4 - 'nothing to commit'

From: Alvin W. Law <alaw_at_oracle.com>
Date: Fri, 1 Jul 1994 18:51:38 GMT
Message-ID: <ALAW.94Jul1105138_at_ap221sun.oracle.com>


In article <772663756snz_at_gjw1992.demon.co.uk> gjwalker_at_gjw1992.demon.co.uk (Gary John Walker) writes:

> Trying to catch the 40401 (I think!) message - 'nothing to
> commit' - when committing updates from a block without base
> table. Have tried the on-change trigger at form, block and
> item level. But it's not firing! I know this because I let
> through other messages with a new text prefix just to test the
> thing out.
>
> The update and commit are in a forms procedure and are called
> from a button trigger (i.e. button marked UPDATE!). Straight
> after the commit I display the last message number - sure enough
> it's the 40401 - nothing to commit. Of course it is *actually*
> committing but just don't want this erroneous message displayed.
>
> I seem to be following the F4 manual's example. Any ideas
> what I'm missing out? Alternatives to redefining on-message?

The tricky thing is that Forms 4 default processing logic does not work if the block has no base table. A simple workaround is to use SYS.DUAL (very dangerous) or a dummy table in the user account as the base table and rewrite the block level ON-UPDATE (and possibly ON-INSERT, ON-LOCK and ON-DELETE) trigger(s).

Now, my question to you is, since you are doing an update, where do you perform the query to base your update from? If you do not perform a query (apparently you can't since you don't have a base table defined for your block), all the records on the form are marked as 'NEW'. Sure enough nothing has changed so an UPDATE does nothing.

P.S. The comments above are my own, and don't reflect the opinions of any

      other person or organization alive, dead, undead, or Living Dead.

--
 Alvin W. Law .............................................. Oracle Corporation
 Project Leader, Cost Management System ........... 300 Oracle Parkway, Floor 6
 Manufacturing Applications .......................... Redwood Shores, CA 94065
 Email: alaw_at_us.oracle.com ............ Voice: 415.506.3390 . Fax: 415.506.7299

ORA-03113: end-of-file on communication channel
Received on Fri Jul 01 1994 - 20:51:38 CEST

Original text of this message