Try OpenEdge Now
skip to main content
.NET Open Clients
Passing Parameters : Passing TABLE and TABLE-HANDLE parameters
 

Passing TABLE and TABLE-HANDLE parameters

This section describes mapping ABL temp-tables to ADO.NET DataTables, using the TABLE and TABLE-HANDLE parameters.
ABL procedures can pass TABLE or TABLE-HANDLE parameters to an AppServer. This is a convenient and efficient way to pass relational data between the client and the AppServer code. The .NET Open Client environment provides the same capability using an ADO.NET DataTable. A .NET Open Client passes an ABL TABLE parameter using an ADO.NET strongly typed DataTable object that is generated by ProxyGen and mapped to the specified temp-table. This strongly typed DataTable object inherits from Progress.Open4GL.ProDataTable, which in turn inherits from the standard ADO.NET class, System.Data.DataTable.
TABLE–HANDLE parameters allow the transfer of dynamic temp-tables between Open Clients and the AppServer, without requiring a complete, static definition of the table on each side of the transfer (as with TABLE parameters). A .NET Open Client passes an ABL TABLE-HANDLE parameter using an ADO.NET DataTable object, System.Data.DataTable.
For each unique static temp-table (TABLE parameter), ProxyGen generates a strongly typed DataTable class, TypedDataTable.cs. TypedDataTable is the name of the static temp-table in the ABL procedure, appended with DataTable. For example, in a procedure with a static temp-table CustTT, TypedDataTable is CustTTDataTable. If other temp-table parameters in other methods in the proxy share the same schema, ProxyGen does not create additional strongly typed DataTable classes but uses the same strongly typed DataTable class for these methods. The name of the temp-table parameter does not matter when comparing the schema of temp-table parameters. However, field names, types, and indexes do need to match. (This differs from ABL in which field names and indexes do not need to match.)
Also, if ProxyGen detects two or more temp-table parameters with the same name but different schemas, ProxyGen creates multiple strongly typed DataTable classes, one for each unique schema. ProxyGen appends a unique number to the end of the temp-table name, to create unique class names. For example, if multiple procedures define a static temp-table CustTT, each with a different schema, TypedDataTable can be CustTTDataTable, CustTT2DataTable, and so on.
All strongly typed DataTable classes are defined in the following namespace:
[namespace.]StrongTypesNS
Where namespace is the General namespace you optionally entered in the .NET Client Details group of the ProxyGen Generate Proxies dialog box. (See Namespacefor proxy objects.)
This section covers the following topics:
*Staticand dynamic temp-tables
*Data type mapping for temp-table fields
*Unknown value(?)
*Temp-tablearray fields
*Indexesfor temp-tables
*Passing a TABLE or TABLE-HANDLE as an INPUT parameter
*Providing ABL extensions for INPUT TABLE-HANDLE parameters
*Passing a TABLE or TABLE-HANDLE as an INPUT parameter
*Passing a TABLE or TABLE-HANDLE as an OUTPUT parameter
*Temp-tableexamples
* Static and dynamic temp-tables
* Data type mapping for temp-table fields
* Unknown value (?)
* Temp-table array fields
* Indexes for temp-tables
* Passing a TABLE or TABLE-HANDLE as an INPUT parameter
* Providing ABL extensions for INPUT TABLE-HANDLE parameters
* Passing a TABLE or TABLE-HANDLE as an INPUT-OUTPUT parameter
* Passing a TABLE or TABLE-HANDLE as an OUTPUT parameter
* Temp-table examples