Create stored procedures
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
The Java source text that makes up the body
of a stored procedure is not a complete Java program, but a program
fragment or snippet that the OpenEdge SQL Engine converts into a
complete Java class when it processes a CREATE PROCEDURE statement. Creating
a stored procedure involves the following steps:
-
A client application or tool issues a
CREATE PROCEDUREstatement that contains the Java source text. - The OpenEdge SQL Engine adds code to the Java snippet to create a complete Java class and submits the combined code to the Java compiler.
-
Presuming there are no compilation errors, the Java compiler
returns compiled bytecode back to the OpenEdge SQL Engine. If there
are compilation errors, the OpenEdge SQL Engine passes the first
error message generated by the compiler back to the application
or tool that issued the
CREATE PROCEDUREstatement. - The OpenEdge SQL Engine stores both the Java source text and the bytecode form of the procedure in the database.
The following figure illustrates the general steps for creating a Java stored procedure.
