Re: PL/SQL code vanish from triggers!!

From: Alex Heney <heneya_at_entcf3.agw.co.bt.uk>
Date: 1996/12/12
Message-ID: <32AFDC0E.607F_at_entcf3.agw.co.bt.uk>#1/1


Raymond G Boyd wrote:
>
> Rein-Amund Schultz wrote:
> >
> > I have a problem:
> >
> > Sometime PL/SQL code seems vanish into thin air
> > from triggers. This happens:
> > I open the form in the designer, add some
> > new triggers and code, compile - everything OK.
> > When I generate I get the message:
> > FRM-10093: No PL/SQL source code.
> > This happens on all types of triggers,
> > and in the amount of 1 to 3 triggers at the time.
<snip>

> >
> > Rein-A. Schultz
> > reinas_at_hrp.no
>
> I have had the same sort of problems with code in triggers disappearing.
> However, when it has happened to me Oracle gave me an error message when
> generating, stating something like
> Program Unit 32 Exists - Continue with creation ? Y/N
 <snip>>
> Regards
> Raymond Boyd

This problem seems to occur fairly often, always (for us) after a message such as that referred to above, and is apparently caused by the underlying name by which Forms identifies a program unit being corrupted, so one overwrites another. What we have found to be a solution is as follows.

  1. When you get the message 'Program unit xx exists', respond 'N'. this puts you back in the program unit editor.
  2. (If the changes you have made are important/large) Select all the text in the trigger/program Unit(PU), and copy to the clipboard (CTRL-C).
  3. REVERT the trigger/PU and close it.
  4. Copy the offending trigger/PU somewhere (anywhere) else in your form, giving it any name you like.
  5. Delete the trigger/PU in the original place.
  6. Move the copy you made back (and give it the correct name if necessary).
  7. Open the new version of the trigger/PU.
  8. Re-make your changes (Select all text then CTRL-V if step 2 carried out).
  9. The Trigger/PU should now save OK, as the underlying name, used by Forms will have been changed at step 4 above.
-- 
The above posting represents the personal opinions of the author and
is not to be taken as official (or unofficial) policy or opinions of 
his employer.

Alex Heney, Living in the Global Village.
Received on Thu Dec 12 1996 - 00:00:00 CET

Original text of this message