PassTABLE and TABLE-HANDLE parameters
- Last Updated: March 30, 2020
- 2 minute read
- OpenEdge
- Version 12.2
- Documentation
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 application server. This is a
convenient and efficient way to pass relational data between the client and the application
server 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 application server, 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:
|
Where namespace is the General namespace you optionally entered in the .NET Client Details group of the ProxyGen Generate Proxies dialog box. (See Namespace for proxy objects.)
This section covers the following topics:
- Static and dynamic temp-tables
- Data type mapping for temp-table fields
- Unknown value (?)
- Temp-table array fields
- Indexes for temp-tables
- Pass a TABLE or TABLE-HANDLE as an INPUT parameter
- Provide ABL extensions for INPUT TABLE-HANDLE parameters
- Pass a TABLE or TABLE-HANDLE as an INPUT parameter
- Pass a TABLE or TABLE-HANDLE as an OUTPUT parameter
- Temp-table examples