Try OpenEdge Now
skip to main content
.NET Open Clients
Using the Open Client .NET OpenAPI to Directly Access the AppServer : Setting up parameters and return types : Setting up a parameter array : Creating a parameter array
 
Creating a parameter array
You can create a ParamArray using the following constructor:

Syntax

public ParamArray(int numParams)
numParams
Specifies the total number of parameters (including all INPUT, INPUT-OUTPUT, and OUTPUT parameters).
You can add each parameter to the ParamArray using a set of methods that add a parameter based on the data type of the parameter or a single generic add parameter method. You must identify the parameter position as well as the mode of the parameter. For temp-tables and ProDataSets, you must identify the meta data. You must also pass in an initial value for input and input-output parameters.
If you want to reuse the ParamArray for another call:
*The number of parameters for the next call must match the number of parameters in the ParamArray object
*You must clear any current values in the ParamArray using the Clear( ) method, as shown:
// Create the ParamArray
ParamArray parms = new ParamArray(1);
.
.
.

// Clear for reuse
parms.Clear( );