Try OpenEdge Now
skip to main content
.NET Open Clients
Passing Parameters : Passing DATASET and DATASET-HANDLE parameters : Passing a DATASET or DATASET-HANDLE as an INPUT parameter
 

Passing a DATASET or DATASET-HANDLE as an INPUT parameter

When the client application passes a static ProDataSet (DATASET parameter) as an INPUT parameter, the client must provide an instance of the strongly typed DataSet class provided by ProxyGen. In this case, the definition of the ProDataSet is known at compile time, and the proxy already knows the schema (meta data) for the ProDataSet, including the tables it contains; therefore, the client application does not need to supply the schema, only the data. The client can add rows to each of the tables within the dataset using the Rows.Add( ) method on the DataTable class.
When the client application passes a dynamic ProDataSet (DATASET-HANDLE parameter) as an INPUT parameter, the proxy does not know the schema (meta data) for the ProDataSet. In this case, the client must provide an instance of System.Data.DataSet that contains both the schema and data for the DATASET-HANDLE parameter. The client can use the methods on the System.Data.DataSet class to add the schema, tables, and rows for each table of the ProDataSet. Also, the client might need to define ABL-specific mappings for the DataSet. See Providing ABL extensions for INPUT DATASET-HANDLE parameters.
Since all strongly typed DataSet classes inherit from System.Data.DataSet and contain extensions necessary to provide the ABL-specific mappings, these classes can also be passed for an INPUT DATASET-HANDLE parameter, as long as the ABL procedure is written to process the schema and data provided in the strongly typed DataSet class.
For INPUT parameters, all the data must be put into the parameter before the proxy call is made.