Example 4: Remote non-persistent procedure with a class-based object as a parameter
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
This example shows how to run a remote, non-persistent procedure, updatecredit.p, that passes a class-based object parameter
to the PAS for OpenEdge instance identified as hAppSrv. The
object rCustObj is an instance of the class myObjs.CustObj, which is created for customer number 101,
passed as numeric argument to the constructor. This class has a public data member
CustCredit of type DECIMAL and a public method ShowCustCredit() that displays a message with the value of CustCredit:
|
The value of rCustObj:CustCredit is
initialized with 0. When the RUN statement is executed,
a remote procedure request to run updatecredit.p is
sent to the PAS for OpenEdge instance that is connected to the hAppSrv server handle. The object rCustObj is passed as an INPUT-OUTPUT
parameter. If the RUN statement completes without
error, the ShowCustCredit() method is called on rCustObj, which was updated and returned by updatecredit.p.