Try OpenEdge Now
skip to main content
ProDataSets
Introducing the OpenEdge DataSet : Defining a static ProDataSet : Using the REPOSITION Data-Relation : Example with REPOSITION not set
 
Example with REPOSITION not set
For example, consider an Order ProDataSet with a Data-Relation from ttOrderLine to ttItem, with relation fields of ttOrderline.ItemNum and ttItem.ItemNum. If you do not define or set the REPOSITION attribute, then the AVM loads into ttItem the Item information for every Item used in at least one OrderLine that is also loaded into the ProDataSet. There might be multiple OrderLines that use the same Order, but because the default fill processing is to discard records with duplicate keys, the AVM automatically discards all duplicates based on the unique index definition for the ttItem temp-table, and you wind up with exactly one instance of each Item used on the ProDataSet's OrderLines. If there is no unique index on the ttItem temp-table, then you wind up with one instance of ttItem for each OrderLine that uses a given Item, which is almost certainly not what you want.