Link to home
Start Free TrialLog in
Avatar of Solve
Solve

asked on

Unxandeled exception 100501

Mabe coul someone help me to get arround such an error??

PDE-PXC002 Program unit execution aborted due to unhandled exception (100501)


Solveiga
Avatar of musdu
musdu

Hi Solveiga,

try to convert your fmb into fmt and then again convert it into fmb. (use file->administraion->convert)

regards.
Avatar of Helena Marková
This is Note:944361.101 from Metalink:

PROBLEM DESCRIPTION:
Running a Form containing a RAISE Form_Trigger_Failure in debug mode  results in the following error:
        PDE-PXC002 Program unit exception abort due to unhandled exception(100501)

PROBLEM EXPLANATION:
In debug mode a form containing a RAISE Form_Trigger_Failure results in the above error. In Oracle Forms 4.5.XX this may also result in the form being stuck in a infinite loop. This occurs on Windows platforms only. There will be an underlying error which causes the form to fail.

Solution Description:
This has been logged as BUG #252205 against Oracle Forms V4.5 and BUG #801399 against Oracle Forms V5.0. The bugs have been fixed in Oracle Forms v6.0.6.4.

Solution Explanation:
The bug fix means that when raising Form_Trigger_Failure Oracle Forms will no longer get into a infinite loop. The error will still appear, however, as this is the correct behaviour.
Avatar of Solve

ASKER

Hei, musdu

here it was your text in previous question about errors ("Cannot delete master when details records exist:

--
-- Begin default enforce data integrity constraint USER_PK_USERID section
--
declare
    cursor primary_cur is select 'x' from SUBE2.TFS_LOGTC
        where USERID1 = :GLB_USER.ID;
    primary_dummy  char(1);
begin
    if ( ( :GLB_USER.ID is not null ) ) then
        open primary_cur;
        fetch primary_cur into primary_dummy;
        if ( primary_cur%found ) then
           message('Cannot delete master record when matching detail records exist.');
           close primary_cur;
           raise form_trigger_failure;
        end if;
        close primary_cur;
    end if;
end;


I also changed cursor.... there AERO_ID is my master block table's primary key.
T_AERO - master block's table

Here I get that program unit error (describet above)
And it don't let me to delete master block even there it is not any details...
Mabe I don't know something?

My text below..


declare
     cursor primary_cur is select AERO_ID from Aviacija.T_AERO
     where AERO_ID = :T_AERO.AERO_ID;
     primary_dummy Number;
     
begin
     if ((:T_AERO.AERO_ID is not null)) then
          open primary_cur;
          fetch primary_cur into primary_dummy;
          if (primary_cur%found) then
               message('Aerodromo '''|| :T_AERO.txt_aero_pav||''' ištrinti negalima. Prieš tai reikia ištrinti takus ');
               close primary_cur;
               raise form_trigger_failure;
          end if;
          close primary_cur;
     end if;
     end;

Have you any suggestions?
Solveiga
Hi Solveiga,

delete and re-create relation between master and detail block. This will also recreate yhe key-delrec trigger. Just change the message in the trigger. Do not change other things in it. I sent my source code to show place of the message you should change. I think this will  fix your problem.

regards.
Avatar of Solve

ASKER

The last one:)

and what does it mean  cursor primary_cur is select 'x' from SUBE2.TFS_LOGTC
        where USERID1 = :GLB_USER.ID;

Solveiga
Hi,

 cursor primary_cur is select 'x' from SUBE2.TFS_LOGTC
        where USERID1 = :GLB_USER.ID;

this code is automatically created by forms when I create a master-detail block. I mean I did not write it :) master-detail relation uses this cursor to understand existence of detail records. (My master table is GLB_USER and my detail table is TFS_LOGTC, if cursor finds a record in detail table related with master table, it gives an error message 'Can not delete master record'. Not a good usage of PL/SQL :)

regards.
Avatar of Solve

ASKER

I created this key-delrec trigger...forms didn't ...
Mabe it will work some day, because now I am not lucky at all... Or mabe I don't know something?

I always get that my message witch i changed... even if there is no detailed records..
I deleted relation between these two blocks and then created the new one... doesn't work anyway :(

Solveiga
Solveiga,

-create a new form
-create a base block (this will be master block) using wizard
-then create a base block and select first block as master
-goto master block, you should see key-delrec trigger.

I believe that it will work today :)
musdu is right, it must work ... :)
Avatar of Solve

ASKER

ok...I accepting your answer musdu, but it is true - Forms doesn't create an key-delrec trigger by itself :((

Solveiga
Have you set Delete_Allowed property of both block to YES ? Also what are relation properties ?
Avatar of Solve

ASKER

Delete_Allowed is Yes for both records and relation properties:
Relation type - Join
Delete record behavior (tryed all three)
doesn't work

Solveiga
Delete Record Behavior property - it has to be set during creation of relation. So if you want to try another behaviour you have to remove existing relation.It is not enough to only change this property in a property palette.
This is from the on-line help:
Setting this property at runtime has no effect for a default master-detail relation. At design time, Form Builder creates the appropriate triggers to enforce the relation, and changing the Delete Record Behavior property at runtime does not alter the default trigger text. The ability to set and get this property programmatically is included only for designers who are coding custom master-detail coordination.
Avatar of Solve

ASKER

Do really form creating that key-delrec trigger in data block level?

Solveiga
I have tried it just now - it creates an ON-CHECK-DELETE-MASTER trigger on master block - it is what we need here.
You can write your own KEY-DELREC triggers - but I think it is not necessary, if you use Forms menu. If you want to write your own KEY-DELREC triggers then start with simple code-
Delete_Record;

I apologise for making a confusion because I generate Forms from Oracle Designer and it generates KEY-DELREC triggers with such a code:
/* CGRI$CHECK_ON_DELETE */
/* This checks that the user is allowed to delete the current row, */
/* prior to removing it,  according to any referential integrity   */
/* rules held in the database design.                              */
BEGIN
  BEGIN
    CGRI$CHK_DOKUMENTY(
      TRUE                   /* IN : Check FKs validated in BOTH (client/server)? */
     ,:DOKUMENT_MASTER.ID);  /* IN : Item value                                   */
  EXCEPTION
    WHEN OTHERS THEN
      CGTE$OTHER_EXCEPTIONS;
  END;
END;

/* CGGN$KEY_DELREC */
/* Perform the key's standard functionality */
BEGIN
  delete_record;
  BEGIN
    CG$CHK_PACKAGE_FAILURE;
  EXCEPTION
    WHEN OTHERS THEN
      CGTE$OTHER_EXCEPTIONS;
  END;
END;
ASKER CERTIFIED SOLUTION
Avatar of musdu
musdu

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Solve

ASKER

At least I understood and know everything working!!! This is what I relly needed!!!
I created my own key-delrec trigger and i only needed to go into on-check-delete-master (this one was created for me automatically)
Thank you musdu and henka for your patience!!

Solveiga