Try OpenEdge Now
skip to main content
SQL Development
Stored Procedures and Triggers : Basics of Java stored procedures : How OpenEdge SQL interacts with Java : Using stored procedures
 
Using stored procedures
Stored procedures extend the SQL capabilities of a database by adding control through Java program constructs that enforce business rules and perform administrative tasks.
Stored procedures can take advantage of the power of Java programming features. Stored procedures can:
*Receive and return input and output parameters
*Handle exceptions
*Include any number and kind of SQL statements to access the database
*Return a procedure result set to the calling application
*Make calls to other procedures
*Use predefined and external Java classes
OpenEdge SQL supports SQL statements in Java through several classes. See OpenEdge Data Management: SQL Reference for more information.
The following table summarizes the functionality of these OpenEdge SQL‑supplied classes.
Table 19. Summary of OpenEdge SQL Java classes
Functionality
OpenEdge SQL Java class
Immediate (one‑time) execution of SQL statements
SQLIStatement
Prepared (repeated) execution of SQL statements
SQLPStatement
Retrieval of SQLPrepared (repeated) execution of SQL statements result sets
SQLCursor
Returning a procedure result set to the application
DhSQLResultSet
Exception handling for SQL statements
DhSQLException