Try OpenEdge Now
skip to main content
.NET Open Clients
Using the Open Client .NET OpenAPI to Directly Access the AppServer : Running procedures and user-defined functions : Running a single-run or singleton procedure (OpenProcObject) on an OpenAppObject
 

Running a single-run or singleton procedure (OpenProcObject) on an OpenAppObject

You can run a procedure with no parameters in the main block as single-run, singleton, or persistent on the connected AppServer using the following method on the OpenAppObject:

Syntax

public OpenProcObject CreatePO(String procName, ProcedureType procType)
procName
Specifies the name of the procedure to run, including any path relative to the PROPATH setting for the AppServer.
procType
A .NET enum type that specifies the procedure as persistent (ProcedureType.Persistent), single-run (ProcedureType.SingleRun), or singleton (ProcedureType.Singleton).
This method returns a Progress.open4gl.Proxy.OpenProcObject, which you can use to run internal procedures and user-defined functions provided by the procedure.
Note: The main block of a singleton or single-run procedure cannot have any parameters, so there is no paramArray available with this syntax. Although persistent procedures can have parameters in general, only persistent procedures without parameters can be run using this syntax.
The OpenProcObject also contains the public property ProcedureType, which holds a value of Persistent, SingleRun, or Singleton, depending on the procedure type of the object: