SQLFORMS3 PROBLEM

From: Simon Rear <simon.rear_at_almac.co.uk>
Date: 12 Apr 93 14:29:00 GMT
Message-ID: <1269.493.uupcb_at_almac.co.uk>


Hi,

I'm using sqlforms 3 and attempting to automatically perform a commit when navigating from the current record.

As you probably know, when the current form is a called form, from a form with unposted changes, commits are not allowed. I needed a routine which either commits or posts changes. The form level procedure I wrote looked something like this;

procedure auto_commit is
begin
:system.message_level := 15

  commit;
  if not form_success then
    post;
    check_package_failure;
  end if;
:system.message_level := 0;

end;

This procedure was then called by the appropriate navigational triggers. When in post only mode I received the error 'FRM-4043: A calling form has unposted changes. Commit not allowed.' and the record was posted. After a little thought I then wrote a message handling routine to suppress the above message, which worked but reset the 'form_success' system variable and so no changes were posted.

Unless I can find an alternative method I shall have to automatically post, rather than commit, changes from a called form just in case the calling form contains un-posted changes. These changes would then be commited when control is passed back to the calling form.

What I need is a way of determining if the current form is running in post only mode or a totally different approach, (which is possible since I am quite new to forms.. and oracle for that matter!).

The fact that the code in the on-error and on-message triggers re-sets the form_success system variable seems very awkward to me as well, it seems to limit these triggers use... Or am I missing the point somewhere???

Any help appreciated

Thanks

simon.rear_at_almac.co.uk

---
 . SPEED 1.20 [NR] . The wrong way always seems more reasonable
                                                
Received on Mon Apr 12 1993 - 16:29:00 CEST

Original text of this message