Kbase P182749: Error 2144 occurs when calling an Oracle Function via DataServer for Oracle / ABL
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  17/02/2011 |
|
Status: Unverified
SYMPTOM(s):
Error 2144 occurs when calling an Oracle Function via DataServer for Oracle / ABL
<procedure> has <number> parameters. you supplied <number>. (2144)
RUN STORED-PROCEDURE get_employee (INPUT 1234, INPUT 60).
CLOSE STORED-PROCEDURE get_employee.
DISPLAY get_employee.
Number of parameter requested in the error text is 1 more than the actual number of parameters required by the Function
FACT(s) (Environment):
Oracle Function is represented as a Table in the schema holder
Table contains an additional field that has the same name as the Table / Function
For example, Function X has parameter A and B so the schema holder table contains fields X, A and B
Data-type of the additional field matches the return type of the Function
OpenEdge 10.x
All Supported Operating Systems
Oracle
CAUSE:
This is expected behaviour. An additional field is created to represent the return value of the Oracle Function. This additional field must be represented as an output parameter in the code.
FIX:
Add an output parameter to the RUN STORED-PROCEDURE statement to accommodate the return value:
RUN STORED-PROCEDURE get_employee (OUTPUT ?, INPUT 1234, INPUT 60).
CLOSE STORED-PROCEDURE get_employee.
DISPLAY get_employee.