INOUT and OUT parameters when one Java stored procedure calls another
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
If an OUT or INOUT parameter
is of data type CHARACTER, then getParam() returns
a Java String Object. You must declare a procedure variable of type String,
and explicitly cast the value returned by getParam to
type String. Before calling getParam() you must
call the SQLCursor.wasNULL method to test whether
the returned value is null. If getParam() is called
for a null value, it raises a DhSQLException.
The getParam() method
returns the value of an INOUT or OUT parameter
identified by the number you specify in the fieldIndex parameter. getParam() returns
the value as an object of the data type you specify in the fieldType parameter.
Since getParam() returns the result as an instance
of class Object, you must explicitly cast your inout_var variable
to the correct data type.
These are the general steps to follow when calling one Java stored procedure from another:
-
Register
OUTparameters in the calling stored procedure. - Declare Java variables in the snippet of the calling procedure.
- Invoke the other stored procedure.
The following example illustrates the steps required for calling one Java stored procedure from another.
|