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

Passing a TABLE or TABLE-HANDLE as an INPUT parameter

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