How to Run and Compile an Oracle Form

Oracle Forms development does not end after designing blocks, canvases, and items. To make your form functional and available for users, you must compile it into an executable file and then run it in a runtime environment. Many beginners find this process confusing, but once you understand the steps, it becomes straightforward.

In this guide, I will walk you step by step through how to run and compile an Oracle Form.


Understanding the Oracle Forms File Types

When you create a form in Oracle Forms Builder, it goes through different file stages:

  1. .FMB (Form Module Binary)
    This is the editable source file created in Forms Builder. Developers work on this file.
  2. .FMX (Form Executable)
    This is the compiled version of the .FMB file. Users cannot modify it; they can only run it.

👉 In simple terms, FMB is for development, while FMX is for execution.


Steps to Compile an Oracle Form

  1. Open the Form in Oracle Forms Builder
    • Launch Forms Builder.
    • Open your .FMB file from the File menu.
  2. Check for Compilation Errors
    • From the menu, select Program → Compile → All.
    • This compiles all objects in the form (triggers, program units, blocks).
    • If errors exist, they will appear in the PL/SQL Editor window. Fix them before proceeding.
  3. Generate the FMX File
    • Once compilation is successful, go to File → Administration → Compile File.
    • This will generate the .FMX executable file in the output directory defined in your Forms Builder configuration.
  4. Verify the FMX File Location
    • By default, the FMX file is stored in the FORMS_PATH directory.
    • Ensure your runtime environment can access this directory.

Steps to Run an Oracle Form

Once compiled into FMX, the form must be run in the Oracle Forms runtime environment.

  1. Start the Application Server
    • Oracle Forms typically runs on WebLogic Server (in modern versions).
    • Ensure the Forms Services are started.
  2. Open a Browser
    • Oracle Forms runs as a web-based application.
    • Use a browser supported by your Oracle Forms version.
  3. Enter the Runtime URL
    • The URL generally follows this format: http://<host>:<port>/forms/frmservlet?form=<form_name>
    • Replace <host> and <port> with your server details.
    • Replace <form_name> with the name of your FMX file (without extension).
  4. Log in with Database Credentials
    • Enter the Oracle Database username, password, and connect string.
    • The form will open and allow you to start entering or managing data.

Example Scenario

Suppose you created a form named student.fmb:

  • You compile it in Forms Builder → Generates student.fmx.
  • The FMX is saved in the FORMS_PATH directory.
  • You access it in the browser with: http://localhost:9001/forms/frmservlet?form=student
  • After logging in, the form opens and connects to the STUDENTS table.

Common Issues and Fixes

  • FRM-40010: Cannot read form file
    → Ensure the FMX file exists in the FORMS_PATH.
  • Invalid Connect String
    → Verify that your TNS entry (tnsnames.ora) is correct.
  • Browser Compatibility Errors
    → Check which browsers your Oracle Forms version supports. Newer versions often work with Chrome and Edge, but older ones may require Internet Explorer.

Tips for Beginners

  • Always compile all objects before generating the FMX.
  • Keep source files (FMB) and executable files (FMX) in separate directories for better management.
  • Use naming conventions for forms, especially in larger projects.
  • Run your form frequently during development to catch errors early.

See also: Key Components of Oracle Forms Architecture

Conclusion

Compiling and running an Oracle Form is a two-step process: first, you compile the FMB into an FMX file, then you run the FMX in the Oracle Forms runtime environment via a browser. Once you master this workflow, you can test your forms quickly, troubleshoot issues, and deliver fully functional applications.


Vinish Kapoor
Vinish Kapoor

Vinish Kapoor is a seasoned software development professional and a fervent enthusiast of artificial intelligence (AI). His impressive career spans over 25+ years, marked by a relentless pursuit of innovation and excellence in the field of information technology. As an Oracle ACE, Vinish has distinguished himself as a leading expert in Oracle technologies, a title awarded to individuals who have demonstrated their deep commitment, leadership, and expertise in the Oracle community.

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments