OpenSQL Reference Guide > OpenSQL Reference Guide > OpenSQL Features > Database Procedures > Guidelines for Executing Database Procedures
Was this helpful?
Guidelines for Executing Database Procedures
To execute a database procedure, issue the EXECUTE PROCEDURE statement.
To ensure portability of your application code and consistency of the transactions in your application, observe the following guidelines for executing database procedures:
Do not issue COMMIT or ROLLBACK statements within a database procedure, because these statements or their equivalents may not be supported in all host database management systems.
Issue a COMMIT or ROLLBACK statement before and after executing a database procedure.
If an error occurs while a database procedure is being executed, the current transaction may be rolled back by the host DBMS. While this is permitted by OpenSQL, it is not required. After executing a database procedure, your application should check for errors and, if necessary, roll back the transaction.
Last modified date: 04/03/2024