Try OpenEdge Now
skip to main content
ProDataSets
Advanced Events and Attributes : Successive loading of ProDataSet data : COPY-DATASET and COPY-TEMP-TABLE methods : Replace-mode argument
 
Replace-mode argument
The replace-mode option defaults to FALSE. If replace-mode is true, the AVM tries to find the corresponding row in the target table, through the target's unique primary index. If a corresponding row is not found in the target table, the AVM uses the source row to create a new target row. If the AVM finds the row in the target, it copies the source row values into that row. If the target row has a BEFORE-TABLE row, that row is left in place. There must be a unique primary index on each target member table in order for the replace-mode option to be used.
When replace-mode is true, it does not matter if append-mode is true or FALSE. The target table is not emptied prior to the copy operation.
Note: If the source or target (but not both) ProDataSet has any before-tables that have any rows in them, you can use COPY-DATASET on that ProDataSet. However, if append mode or replace mode is specified, the target ProDataSet may not have before-tables. These same rules apply to copying temp-tables using the COPY-TEMP-TABLE method.