Re: No changes to save

From: Jim Anderson <anderson_at_ci.lincoln.ne.us>
Date: Thu, 14 Jan 1999 12:23:41 -0600
Message-ID: <369E362C.523E674_at_ci.lincoln.ne.us>


I have this same problem when I have multiple forms open with Forms Runtime. This may or may not be your problem, but the way I got around it was to create an ON-MESSAGE and ON-ERROR trigger to filter out these messages. For example:

DECLARE

  ERR_TYPE VARCHAR2(3)  := ERROR_TYPE;   -- This is FRM, ORA, etc.
  ERR_CODE NUMBER       := ERROR_CODE;   -- This is the code #
  ERR_TEXT VARCHAR2(80) := ERROR_TEXT;   -- This is the text displayed
BEGIN
  IF (ERR_TYPE='FRM' AND ERR_CODE IN (40405,40102)) THEN
  • no changes to save, new record; NULL; ELSE
  • This is what normally happen to errors. MESSAGE(ERR_TYPE||'-'||TO_CHAR(ERR_CODE)||': '||ERR_TEXT); RAISE FORM_TRIGGER_FAILURE; END IF; END;
HTH,
Jim Anderson

Jim Limberatos wrote:

> First of all, thanks to those people who told me to use FORMS_DDL('COMMIT');
> to save changes as a result of SQL (as opposed to the usual COMMIT;) in a
> forms program unit; this got rid of one kind of "No changes to save"
> message.
>
> Now I've got another!
>
> I have a simple master-detail form. When the user changes something, and
> tries to go on to the next record, they get the standard message "Do you
> want to save the changes". They click Yes, and the next record is retrieved.
> When they change the next record, and move on to the next, they get prompted
> again, but after they click YES this time (and every subsequent time) they
> get an Oracle error "No changes to save" (why the hell is this an error
> anyway??) even though they obviously made changes. After they dismiss this
> stupid dialog box, the next message is "1 records were saved" or whatever at
> the status bar in the bottom. HUH?
>
> I guess my question is
>
> Why does FORMS 4.5 (Win 95 if it matters) prompt us to save changes, and
> then tell us there are no changes to save when we try to save them? Have I
> set some property wrong on the blocks or relation?
>
> HINTS:
> a) I get the message only after the 1st time I save a change
> b) It doesn't matter which items I change and save (master or detail), I
> still get the error.
> c) Even pressing F10 (commit form) manually to save a change gives the
> problem.
> d) I have a WHERE clause in the MASTER block which only selects those
> records that have corresponding DETAIL records
> e) All the items that I try to change are base table items, but there is one
> non-base table item in the detail block which is not updateable anyway.
> f) I am not basing the blocks on any VIEWS.
> g) The data is being saved normally, but you wouldn't think so from the
> message
>
> TTYL
Received on Thu Jan 14 1999 - 19:23:41 CET

Original text of this message