Defining the data-relations for the ProDataSetMetaData object
You must define any data-relations that are defined for the ABL ProDataSet using Progress.Open4GL.Proxy.ProDataRelationMetaData objects. You can create a ProDataRelationMetaData object for each data-relation between a parent and child temp-table using the following constructor:
Syntax
public ProDataRelationMetaData(string dataRelationName, int parentIx,
int childIx, int numPairs, string pairsList)
dataRelationName
Specifies the name of the ProDataRelationMetaData object.
parentIx
Specifies a 0-based index to a parent temp-table (ADO.NET DataTable) that corresponds to the order in which you have added the TempTableMetaData to the ProDataSetMetaData using the ProDataSetMetaData AddDataTable( ) method. If you have the ADO.NET DataSet for the ProDataSet, you can also use the ADO.NET DataSet.Tables property to identify the order for this index value.
childIx
Specifies a 0-based index to a child temp-table (ADO.NET DataTable) that corresponds to the order in which you have added the TempTableMetaData to the ProDataSetMetaData using the ProDataSetMetaData AddDataTable( ) method. If you have the ADO.NET DataSet for the ProDataSet, you can also use the ADO.NET DataSet.Tables property to identify the order for this index value.
numPairs
Specifies the number of column property pairs (key field pairs) that represent this relationship. This allows multiple fields to represent a key relationship between the parent and child temp-table.
pairsList
Specifies a string containing a comma-separated list of field names. The list consists of numPairs field pairs, where the child temp-table field name for each pair is followed by its matching parent temp-table field name. The data types of the named child and parent temp-table field pairs must be comparable.
Note: For the equivalent ProDataRelationMetaData( ) constructor in the Java OpenAPI, the order of child and parent field names in the pairsList parameter is reversed. For more information, see OpenEdge Development: Java Open Clients.
You can add each data-relation definition to the ProDataSetMetaData object using the following method:
public void AddDataRelation(ProDataRelationMetaData drMetaData)
drMetaData
Specifies a data-relation to include in the ProDataSetMetaData object.