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 : Defining the schema for a temp-table parameter : Defining a TempTableMetaData object
 
Defining a TempTableMetaData object
For each temp-table (DataTable), you must define a Progress.Open4GL.Proxy.TempTableMetaData object to hold the schema using the following constructor:

Syntax

public TempTableMetaData(string dataTableName, string strongTypeName,
                         int numFields, bool bimageFlag,
                         int numIndexes, string multiIxCols,
                         string XMLNamespace, string XMLPrefix)
dataTableName
Specifies a name for the specified DataTable. This name is typically identical to any ABL temp-table to which this collection is mapped.
strongTypeName
Specifies the type name for a strongly-typed ADO.NET DataTable, or null.
numFields
Specifies the number of fields in the specified DataTable.
bimageFlag
Specifies true if the corresponding ABL temp-table is defined with the BEFORE-TABLE option, indicating that the temp-table (and hence the DataTable) can be modified. Otherwise, this value must be false and you cannot pass modified data between the Open Client and the AppServer.
numIndexes
Specifies the number of indexes on the table.
multiIxCols
Specifies null if there are no indexes or a formatted string that contains all the index info for this temp-table, as follows:
"[primeUniqueFlag,primeFld1[,primeFldn]...:primeIdxName.]
[uniqueIdxfld1[,uniqueIdxfldn]...:uniqueIdxName.]..."
primeUniqueFlag
Specifies a primary index with a value of 1 if the index is unique and a value of 0 if the index is not unique.
primeFld1 [,primeFldn]...
Specifies the names of one or more fields involved in the primary index.
primeIdxName
Specifies the primary index name.
uniqueIdxfld1 [,uniqueIdxfldn]...
Specifies names of one or more fields involved in a unique secondary index.
uniqueIdxName
Specifies a unique secondary index name.
Thus, a table can have no indexes, a single primary index followed by zero or more secondary unique indexes, or it can have a single secondary unique index followed by zero or more additional secondary unique indexes. See the following examples:
*Table with a single primary index:
"1, custNum:CustIndex"
This is a primary unique index named CustIndex with one column named custNum.
*Table with a single secondary index:
"orderDate:OrderIndex"
This is a secondary unique index named OrderIndex with one column named orderDate.
*Table with two indexes:
"1,custNum:CustIndex.orderDate,shipDate:OrderIndex"
These two indexes include:
*A primary unique index named CustIndex with one column named custNum
*A secondary unique index named OrderIndex with two columns named orderDate and shipDate
*Table with three indexes:
"0,custNum,custName:CustIndex.orderDate:OrderIndex.
itemNum:ItemIndex"
These three indexes include:
*A primary non-unique index named CustIndex with two columns named custNum and custName
*A secondary unique index named OrderIndex with one column named orderDate
*A secondary unique index named ItemIndex with one column named itemNum
XMLNamespace
Specifies the namespace for XML serialization or null.
XMLPrefix
Specifies the prefix for XML serialization or null.