You can call a database procedure in Oracle Forms as you call in Oracle Database itself using PL/SQL. Below are the examples:
Call a Database Procedure in Oracle Forms Examples
In the following case, it will simply call a database procedure by specifying its name followed by the semicolon.
BEGIN
proc_emp_data;
END;
To call a database procedure from another schema, add the schema name before procedure name as shown below:
BEGIN
/* It will call the procedure from emp_arch schema */
emp_arch.proc_emp_data;
END;
Calling a database procedure with IN and OUT parameters in Oracle Forms. In the below example, it will call the procedure with IN parameter l_in_empno and getting the employee name in OUT parameter l_out_name.
DECLARE
l_in_empno emp.empno%TYPE;
l_out_ename emp.ename%TYPE;
BEGIN
proc_emp_data (l_in_empno, l_out_ename);
END;
Calling a database procedure inside a package. In the below example, it will call the procedure same as above but from a database package by specifying its name before the procedure, for example, db_package_name.db_procedure_name.
DECLARE
l_in_empno emp.empno%TYPE;
l_out_ename emp.ename%TYPE;
BEGIN
pkg_emp.proc_emp_data (l_in_empno, l_out_ename);
END;
See also:
- How To Create Procedure for DML in Toad for Oracle?
- Utility: Generate PL/SQL Procedure to Export Data From a Table in 2 Minutes