If you’ve already upgrated to the latest Forms version (currently 126.96.36.199) you’ve maybe encountered following problem:
If you use a cursor, that is specified in a package specification within your forms and define a rowtype based on that cursor that is fetched into the rowtype in a different other part of the form (in my case the package body). If you then try to compile you may get the error 801 internal error [unexpected fragile external reference] from figure 1.
Figure 1: Compilation error
We’ve opened a service request for that problem in metalink and received an answer, that I would like to show you in this blogpost. There is also a bug filed as well: Bug 23250870
The solution for the compilation error and it’s solution is described the following document in Metalink. It says, that the base bug is a PLSQL bug.
Rather than providing a patch for that problem, Oracle gives the information, that you have to set following variable to one to enable the compilation:
If you set a path variable in CMD before starting the Forms Developer and then execute frmbld.exe you are able to compile a module that contains a construct like:
PACKAGE Test IS cursor c1 is select name_object from all_obj; master_rec c1%ROWTYPE; END;
Package body Test is Procedure p1 is begin fetch c1 into master_rec; close c1; end p1; end;
Registry entry & environment variable
Warning: Changing the Windows registry can mess up your OS.
I’ve tried to also create a registry entry in a Windows machine under HKEY_LOCAL_MACHINE\Software\Oracle\KEY_OracleHome1 and set it to “1” so you don’t have to execute a batch before running Forms Builder. Also I have tried to create a new environment variable. Both options enable the Forms Builder to compile. But I had complications while compiling a bigger customer forms module, when I hit directly Ctrl+shift+k – the Forms Builder crashed when I did not connect to the database before hitting the hotkey.