MERGE-ROW-CHANGES( ) method
- Last Updated: July 20, 2021
- 2 minute read
- OpenEdge
- Version 12.2
- Documentation
Merges a single changed row from a source ProDataSet object loaded with the GET-CHANGES( ) method into the corresponding row in the original (target) ProDataSet temp-table buffer.
Return type: LOGICAL
Applies to: Buffer object handle (of the source ProDataSet)
The syntax for invoking this method follows:
Syntax
|
- change-handle
- A handle to the buffer object of a before-image temp-table for a changed row, or to the buffer object of an after-image temp-table for an unchanged row, of the source ProDataSet.
- original-handle
- A handle to the buffer of the original (target) ProDataSet temp-table to
merge with the changed row from the source ProDataSet.
The AVM uses original-handle only to match to the original table currently associated with change-handle (specified in the ORIGIN-HANDLE attribute). The current row in this table is ignored.
- copy-all-mode
- An optional logical expression, where TRUE indicates that the
AVM always merges the row.
When TRUE, the AVM merges the after-image table row whether or not it contains changes. In this case, the temp-table in the original ProDataSet object must have a unique primary index that the AVM can use to find the corresponding row from the after-image table (since an unchanged row does not have a corresponding row in the before-image table). When a corresponding row is not found in the original ProDataSet object, the AVM creates a new row using the row from the after-image table. When FALSE, the AVM merges only an after-image table row that contains changes. The default value is FALSE.
If the
ERROR attribute or REJECTED attribute for the changed row is TRUE,
the MERGE-ROW-CHANGES( ) method backs out the change. Otherwise,
this method accepts the change by copying the after-image table
row to the corresponding after-image table row in the original ProDataSet
temp-table. The AVM also sets the BEFORE-ROWID attribute of the
row in the after-image table to the Unknown value (?),
sets the ROW-STATE of the row in the after-image table to ROW-UNMODIFIED
(0), and removes the before-image table row (if it has one).