Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Location
    Jordan
    Posts
    137

    Unhappy Unanswered: Is this normal in Forms6i !!!!!!!!

    hi there

    I have this code that run when button pressed in Forms6i



    BEGIN

    insert into xx values(:ITEM); -- xx is table with no rows

    if :ITEM = 1 then -- :item is text item in the form
    Raise FORM_TRIGGER_FAILURE;
    else
    commit;
    end if;


    END;



    when I enter 1 in :ITEM and press the button 4 times, I found nothing in xx which is normal, after that I entered 2 in :ITEM, I found these values in xx :

    1
    1
    1
    1
    2

    Can anyone explain that, and help me so I insert only the right entry

    thanx

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

    Re: Is this normal in Forms6i !!!!!!!!

    Raising FORM_TRIGGER_FAILURE does not cause a rollback as you expect. Why don't you do this:

    BEGIN

    if :ITEM = 1 then -- :item is text item in the form
    Raise FORM_TRIGGER_FAILURE;
    else
    insert into xx values(:ITEM); -- xx is table with no rows
    commit;
    end if;

    END;

  3. #3
    Join Date
    Feb 2004
    Location
    Jordan
    Posts
    137

    Re: Is this normal in Forms6i !!!!!!!!

    Dear andrewst

    actually this is not the same case that I have, Its just a sample,
    I have alot of check statments and after every check there are insert or update statments,

    after that (all checks are ok) I apply COMMIT command,

    what do you think about apply ROLLBACK or FORMS_DDL('ROLLBACK')
    before RAISE FORM_TRIGGER_FAILURE

    so the code will be like this :

    BEGIN

    insert into xx values(:ITEM); -- xx is table with no rows

    if :ITEM = 1 then -- :item is text item in the form
    FORMS_DDL('ROLLBACK') ;
    Raise FORM_TRIGGER_FAILURE;
    else
    commit;
    end if;

    END;

Posting Permissions

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