PreviousNextIndex

SAVE-ROW-CHANGES( ) method

Saves changes from one row of a ProDataSet temp-table to the associated data source.

Return type: LOGICAL

Applies to: Buffer object handle

Syntax
handle:SAVE-ROW-CHANGES( [ buffer-index | buffer-name  
                         [ , skip-list [ , no-lobs ] ] ] ) 

handle
buffer-index
buffer-name
skip-list
no-lobs

The data source must be attached before calling this method. If there is no data source, or special processing is needed, you must write the code to save the changes instead of using the SAVE-ROW-CHANGES( ) method.

The AVM saves ProDataSet buffer changes to the associated data source based on the current MERGE-BY-FIELD attribute and PREFER-DATASET attribute settings.

When MERGE-BY-FIELD is TRUE, the AVM merges changes from a ProDataSet temp-table buffer to the associated data source on a field-by-field basis. When MERGE-BY-FIELD is FALSE, the AVM does not merge changes on a field-by-field basis.

Note: Merging a large number of changes from a ProDataSet object to the data source on a field-by-field basis is slower than saving changes buffer-by-buffer.

Before saving any changes, the AVM compares the before-image of the ProDataSet temp-table buffer or field, saved while tracking changes for the buffer, to the corresponding buffer or field in the data source to determine whether the data in the data source has changed since being read.

If the data in the data source has not changed, the AVM copies the ProDataSet buffer or field to the data source. If the data in the ProDataSet buffer or field was deleted, the AVM deletes the data from the data source.

If the data in the data source has changed, the AVM saves the ProDataSet buffer changes based on the current PREFER-DATASET attribute setting. When PREFER-DATASET is TRUE, the AVM copies the data from ProDataSet buffer or field to the data source regardless of any changes made to the data in the data source since the data was read. When PREFER-DATASET is FALSE, the AVM does not copy the data from the ProDataSet buffer or field to the data source. The AVM copies the conflicting data from the data source to the ProDataSet buffer or field, instead, and sets the ERROR attribute and DATA-SOURCE-MODIFIED attribute to TRUE.

If the AVM encounters an error, it sets the value of the ERROR attribute to TRUE for the associated ProDataSet object handle, Temp-table object handle, and Buffer object handle.


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex