Product Documentation

FairCom Java & .NET Stored Procedures

Previous Topic

Next Topic

Creating Stored Procedures

The Java source code that makes up the body of a stored procedure is not a complete program. It is a snippet that FairCom DB SQL converts into a Java class when it processes a CREATE PROCEDURE statement.

Creating a stored procedure involves the following steps:

  1. Some application or tool (FairCom DB SQL Explorer, Interactive SQL utility, or an application) issues a CREATE PROCEDURE statement containing the Java snippet.
  2. FairCom DB SQL adds additional supporting code to the Java snippet to create a complete Java class and submits the combined code to the Java compiler (javac).
  3. Presuming there are no Java compilation errors, the Java compiler sends compiled bytecode back to FairCom DB SQL. If there are compilation errors, FairCom DB SQL passes the first error generated back to the application or tool that issued the CREATE PROCEDURE statement.
  4. FairCom DB SQL stores both the Java source code and the bytecode form of the procedure in the database.

The following figure illustrates the steps in creating a stored procedure:

Creating Stored Procedures

TOCIndex