Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2002
    Location
    germany
    Posts
    5

    Unanswered: oracle forms:commit

    hallo
    i have in my code 2 commit:
    insert into child_masken values(:Global.child_id,:Global.child_name);
    commit;

    and

    delete from child_masken where child_maske_id=child_id;
    commit;

    and the forms make tow errors:
    FRM-40401: No changes to save.
    Cause: No records were added or modified since the last apply or save.
    Action: No action is necessary.
    Level: 5
    Type: Error

    FRM-40405: No changes to apply.
    Cause: No records were added or modified since the last apply or save.
    Action: No action is necessary.
    Level: 5
    Type: Error

    what i doing false??.
    can me some one help
    thanks
    youssef

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: oracle forms:commit

    In Forms, a COMMIT is treated as a call to the COMMIT_FORM built-in. This raises the errors you see above if there are no changes in the form's blocks to commit.

    You can handle this two different ways:

    1) If you only want to commit the changes in your code, not the form data, then use FORMS_DDL('COMMIT') instead.

    2) If you want to do a COMMIT_FORM but not see the error messages, you can suppress them in one of 2 ways:

    a) YSTEM.MESSAGE_LEVEL := 10;
    COMMIT_FORM;
    YSTEM.MESSAGE_LEVEL := 0;

    b) Build an ON-ERROR trigger that checks the error code and suppresses FRM-40401 and FRM-40405 errors while raising others.

  3. #3
    Join Date
    Apr 2002
    Location
    California, USA
    Posts
    482

    Cool

    Create a procedure which to handle the DML and COMMIT inside its code. Then call this procedure from the Forms trigger, eg.

    CREATE or REPLACE PROCEDURE test_proc
    AS
    PRAGMA Autonomous_Transaction;

    BEGIN
    your DML goes here;
    COMMIT;

    END;
    /


    Hope that helps,

    clio_usa
    OCP - DBA

  4. #4
    Join Date
    Apr 2002
    Location
    California, USA
    Posts
    482

    Cool

    Create a procedure which to handle the DML and COMMIT inside its code. Then call this procedure from the Forms trigger, eg.

    CREATE or REPLACE PROCEDURE test_proc
    AS
    PRAGMA Autonomous_Transaction;

    BEGIN
    your DML goes here;
    COMMIT;

    END;
    /


    Hope that helps,

    clio_usa
    OCP - DBA

  5. #5
    Join Date
    Apr 2002
    Location
    California, USA
    Posts
    482

    Cool

    Create a procedure which to handle the DML and COMMIT inside its code. Then call this procedure from the Forms trigger, eg.

    CREATE or REPLACE PROCEDURE test_proc
    AS
    PRAGMA Autonomous_Transaction;

    BEGIN
    your DML goes here;
    COMMIT;

    END;
    /


    Hope that helps,

    clio_usa
    OCP - DBA

  6. #6
    Join Date
    Apr 2002
    Location
    California, USA
    Posts
    482

    Cool

    Sorry, the replay got stuck for some reason. Disregard the extra posts.

    Would like to delete them if there is a way.


    Hope that helps,

    clio_usa
    OCP - DBA

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •