Re: Fixing Corrupt Forms
From: <m_streeter_at_my-deja.com>
Date: Wed, 19 Apr 2000 15:34:27 GMT
Message-ID: <8dkjm3$ns3$1_at_nnrp1.deja.com>
Date: Wed, 19 Apr 2000 15:34:27 GMT
Message-ID: <8dkjm3$ns3$1_at_nnrp1.deja.com>
Hi,
I presume you are working from your local disk and have checked to make sure the forms aren't owned by Administrator and you don't have access, or something like that.
I am having difficulty myself with several forms which cannot be opened any more (FRM-10043: Cannot Open File) and am looking through Deja.com to try and find a solution. Here is an email I got from Oracle on the subject that might help.
I'm still looking however. If you find a way of getting an .FMB from an .FMX, or directly analysing the content of an .FMB, please let me know.
Many thanks,
Michael Streeter
--
Article-ID: <Note:40644.1>
Circulation: PUBLISHED (EXTERNAL)<Help:KRSTATUS.PUBLISHED>
Folder: client.Dev2000.Forms.V4 <Topics:3844.0>
Topic: Oracle Forms Hints - General Hints
<Articles:3844.0.397.0>
Title: Recovering Corrupted Forms
Document-Type: FAQ
Impact: MEDIUM
Skill-Level: CASUAL
Updated-Date: 04-AUG-1999 22:38:55
References:
Shared-Refs:
Authors: DRMILLS.UK
Attachments: NONE
Content-Type: TEXT/PLAIN
Products: 45;
Platforms: GENERIC;
Recovering Corrupted Forms
==========================
Introduction:
-------------
This note discusses techniques that you can use to recover a "corrupted"
form or library. In this context, a corrupted form is a .FMB (or .PLL)
file which you can successfully open in Developer/2000 Forms Designer,
but are unable to save or generate without an internal error or General
Protection Fault.
Classes of Corruption:
----------------------
Broadly speaking, we tend to encounter several distinct causes and
types of Forms corruption: some of which are rooted in specific bugs,
some "just happen", and of course, corruptions due to physical factors,
such as media failure or an interrupted save.
Fixing Corruptions:
-------------------
a) CHKCONS=YES
As of Developer/2000 Release 1.2 (Forms 4.5.6.5.5), a new option was
added to the f45gen.exe program to fix internal inconsistencies
within a FMB file.
This method effectively does a sanity check on the internal
structure of the FMB file and removes any references that no longer
make sense. For instance, an Item has a Visual Attribute assigned and
the internal address for that Visual Attribute within the FMB file is
empty. CHKCONS is commonly used to fix GPFs in F45DESM.
To use CHKCONS on MS-Windows, you need to duplicate the Forms
Generate Icon and change its properties to add the CHKCONS option in.
CHKCONS is not available from the Generate dialog. Hence, to "fix" a
form called FOO in 16-bit forms, set the command line up for the copied
Generate icon as follows:
c:\orawin\bin\f45gen.exe module=foo userid=scott/tiger chkcons=yes
You then double-click on the icon to run Generate with these options.
A dialog then appears, stating that no file has been generated.
this is correct since no FMX file has been produced; however, the
date/timestamp on the FMB has changed.
CHKCONS should not be used with any other options, and is only
applicable to FMB files.
CHKCONS does not require the form to be openable in the Forms
Designer, so is worth trying when you have an un-openable FMB file.
b) PURGEPUS=YES
As of Developer/2000 Release 1.2 (Forms 4.5.6.5.5), the PURGEPUS
option was added as an argument to the Forms Designer. This option
specifically addresses the following error that occurs when you open
a form in the Designer:
A program unit PU_<number> already exists. Continue compilation?
Choosing to continue at this point can result in the loss of program
units from the form. The PURGEPUS option fixes this problem.
To use this option, create a new icon for f45des.exe (or
f45des32.exe) that has the following command line:
c:\orawin\f45des.exe purgepus=yes
Only use this option when you get the duplicate program units error.
The option slows down the loading time of forms considerably. As
soon as the module successfully opens, re-save the form and exit the
Forms Designer.
c) Conversion of the File from Binary to Text and back to Binary
Converting between binary and text files is of most use with
problem PLL files and represents a very good method for "cleaning up"
a library file.
To convert a library named foo.pll:
1) To convert to Text:
f45gen module=foo module_type=library userid=scott/tiger
script=yes
2) Check the PLD file that has been generated for obvious
corruptions (e.g. PU's with no code, duplicate PU names). This file is
plain text.
3) Revert to a PLL:
f45gen module=foo module_type=library userid=scott/tiger
parse=yes compile_all=yes
d) Drag & Drop Rebuild
Support finds Drag & Drop Rebuild to be an excellent technique for
recovering problem modules. The process is relatively painless and
basically results in a new form which is clean internally:
1) Create a new form in the Forms Designer.
2) Delete WINDOW0 from the new form.
3) On the Form Module property sheet, set the Coordinate System &
the Character Cell Width/Height properties. In addition, set any other
form-level properties, such as Title and Comments.
4) Attach libraries that the problem form uses to the new form.
5) If the problem form contains referenced object groups or other
objects, open the reference forms one at a time and drag (to reference)
the object groups and other objects into the new form.
6) Open the problem form.
7) Copy the blocks into the new form:
a) Expand the Blocks node of the problem form.
b) Shift-select all the NON-REFERENCED blocks.
c) Drag & drop the blocks into the new form.
d) In the Forms dialog, click on the Copy button.
e) In the Copy Object Options dialog, accept the defaults
and click on the OK button.
This copies all the canvases, windows, blocks, and items
from the problem form into the new form.
8) Select the Program Units node in the problem form, and
drag & drop into the new form. This automatically copies all
program units from the problem form into the new form.
9) Copy all the form-level triggers into the new form:
a) Select the Triggers node in the problem form.
b) Drag & drop into the new form.
c) In the Forms dialog, click on the Copy button.
d) In the Copy Object Options dialog, accept the defaults
and click on the OK button.
Note: All the block-level and item-level triggers were copied
along with the blocks.
10) Save the new form.
--
In article <1459ede4.2d51662c_at_usw-ex0101-006.remarq.com>,
Robert sharpe <robert.sharpeNOroSPAM_at_abbeynational.co.uk.invalid>
wrote:
> Hi, there we are currently developing an Oracle system using
> Devloper 2.1 for NT - and are getting some corrupt forms. Does
> anyone know of a way not to get corrupt forms or of a way to fix
> a corrupt form.
>
> Thanks
> Bob
>
> * Sent from RemarQ http://www.remarq.com The Internet's Discussion
Network *
> The fastest and easiest way to search and participate in Usenet -
Free!
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Apr 19 2000 - 17:34:27 CEST
