Solved

Compiling .fmb to .fmx file but unable too because of compilation errors stopping it.

Posted on 2006-07-21
18
3,466 Views
Last Modified: 2012-08-13
I'm trying to compile the .fmb to create an up-to-date .fmx file. But when I compile it, I get compilation errors and stop it from creating an up-to-date .fmx file.

My questions is: Does it has to be no compilation errors inorder for the form builder to create an up-to-date .fmx file? Or What am I doing wrong?  I'm working on the file that has been worked on by a previous programmer and this .fmb is the original file that the programmer has worked on and compiled the .fmb to .fmx file.

Here is some of the errors:
PL/SQL Error 201 at line 42, column 42 identifier 'LOOKUP_IBR' must be declared
PL/SQL Error 0 at line 42, column2 Statement ignored.
0
Comment
Question by:jhstinson
18 Comments
 
LVL 14

Expert Comment

by:sathyagiri
Comment Utility
Yes there should be no errors for a .fmx file to be created from a .FMB.

Make sure your form builder is connected to the correct database while compiling.

Looks like either are you're missing a column or a table
0
 
LVL 12

Expert Comment

by:jwahl
Comment Utility
try searching for the program units where the errors occur (Form Builder: Menu "Program" - "Find and Replace PL/SQL" - search for "LOOKUP_IBR").
maybe this will give you some hints ...

by the way: LOOKUB_IBR sounds like the (default) name of a database trigger for the table LOOKUP ("IBR": "Insert Before Row") ...
0
 

Author Comment

by:jhstinson
Comment Utility
Well, I'm not at the client site now to be able to take a look at the code at the moment. But if I remember correctly, LOOKUP_IBR  is the name of the function. It was in one of the level tree (I think this is the correct term for it) and didn't have the function for it in the same level. Is it possible to call a function from another level. FYI, I'm still new to Oracle...
0
 
LVL 12

Expert Comment

by:jwahl
Comment Utility
with "level tree" do you mean the object navigator in forms builder?

if LOOKUP_IBR is a function, there may be some reasons to get the error:

1)
a pl/sql library (*.pll/*.plx) containing this function is not attached to the form.

2)
LOOKUP_IBR is a database function and you have no privileges to use it or it does'nt exist (check it in sqlplus: DESC LOOKUP_IBR).

did you use the right user and database connection when compiling the fmb to fmx?
0
 

Author Comment

by:jhstinson
Comment Utility
1.)How do you attached the pl/sql library(*.pll/*.plx) to the form? So just put the same file with the (*.pll/*.plx) within the same folder?

2.) It should be the right user since I'm logging in as administrator user and the database should be right also because all database structure is the same for 2-3 years.
0
 
LVL 12

Expert Comment

by:jwahl
Comment Utility
libraries can be attached with (hardcoded) path or just as logical object. in most cases the forms are attached in the second way, so they only have to exist in the path where forms has access to.

storing all form files (menu, form, library) in the same folder is the most common way ...

how do you generate *.fmb to *.fmx: using form builder or with the command line tool (ifbld60.exe, ifbld90.exe, ...)?
0
 

Author Comment

by:jhstinson
Comment Utility
I just use Crtl-T in the form builder.
0
 
LVL 12

Expert Comment

by:jwahl
Comment Utility
use Menu "Program" - "Compile" - "All" (SHIFT+CTRL+K) do recompile the whole form. if there are no errors, create the fmx with CTRL-T.

if there are errors, check where the error occurs (Menu "Program" - "Find and Replace PL/SQL" - search for "LOOKUP_IBR").
is it a forms trigger, a forms program unit, a library program unit or a database object?
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:jhstinson
Comment Utility
It is in the forms program unit and in the procedure body(one of the LEVEL)
0
 
LVL 12

Expert Comment

by:jwahl
Comment Utility
you have to check INSIDE of the procedure what is missing.

you should execute the same (or similar) code in sqlplus as same user to make sure tat you have access to all objects.

maybe if you're  posting parts of the code we can see a little bit more ...
0
 

Author Comment

by:jhstinson
Comment Utility
I was about to post up the code for you to take a look at. It seem like it is reading from a file, I think. But I can't find the path of the file.

TEXT_IO.PUT(file_handle,Lookup_IBR(prop_rec.drug_type,'29'));
0
 
LVL 12

Expert Comment

by:jwahl
Comment Utility
PUT procedure writes data in a file at the filesystem. look at a previous TEXT_IO.FOPEN command where file and path of this file are defined.

but the main problem didn't change: you don't have access to the function LOOKUP_IBR or this function doesn't exist.

in the procedure where the error occurs maybe there is defined a cursor with loop where the record prop_rec.drug_type is declared. check if this is varchar2, number or date and check in sqlplus:

SELECT lookup_ibr('ABC', '29') from dual; -- if prop_rec.drug_type is VARCHAR2
SELECT lookup_ibr(1, '29') from dual; -- if prop_rec.drug_type is NUMBER
SELECT lookup_ibr(SYSDATE, '29') from dual; -- if prop_rec.drug_type is DATE

is there still an error because lookup_ibr does not exist?


0
 

Author Comment

by:jhstinson
Comment Utility
Yes, there still an error because lookup_ibr does not exist as a column. The drug_type is an varchar2 data type. What the purpose of doing the select command like that? I have never done it that way before for the column.
0
 

Author Comment

by:jhstinson
Comment Utility
FUNCTION Arrest_Exists (complainid_in  IN  VARCHAR2,
                        incd_seq_in    IN  VARCHAR2)
RETURN BOOLEAN
IS
  CURSOR arrest_cur IS
    SELECT nameid
      FROM arrest
     WHERE arrest.complainid = complainid_in
       AND arrest.incd_seq   = incd_seq_in;
   arrest_rec    arrest_cur%ROWTYPE;
   return_value  BOOLEAN;
BEGIN
  OPEN arrest_cur;
  FETCH arrest_cur INTO arrest_rec;
  IF arrest_cur%FOUND THEN
        return_value := TRUE;
  ELSE
        return_value := FALSE;
  END IF;
 
  RETURN return_value;
 
  EXCEPTION
        WHEN OTHERS THEN
          Raise_Stop_Alert('The following error occurred in the Arrest_Exists function for '||complainid_in||'-'||incd_seq_in||': '||SQLERRM);
          RETURN FALSE;
END;


Ok, here is a short code of a function and it is throwing an error of:
Error 201 at line 25, column 6 identifier 'RAISE_STOP_ALERT' must be declared
Error 0 at line 25, column 6 Statement ignored.

I think I am missing something when I'm trying to compile this file.

0
 

Author Comment

by:jhstinson
Comment Utility
Ok, I found the function for Lookup_IBR. I have to open another file(PL/SQL Libraries). I didn't realized you have to open two files to get the form and the function into the Object Navigator. Now, how do I compile the form so that it is connected to the PL/SQL Libraries without getting an compilation errors?
0
 

Author Comment

by:jhstinson
Comment Utility
Nevermind, I figure it out now. I had to attached to the form inorder to create the fmx file. Thanks for your help though.
0
 

Accepted Solution

by:
CetusMOD earned 0 total points
Comment Utility
PAQed with points refunded (50)

CetusMOD
Community Support Moderator
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now