Previous Next

SAVE-ROW-CHANGES( ) method
Saves changes from one row of a ProDataSet temp-table to the associated data source.
Return type:
Applies to:
 
Syntax 
buffer-handle:SAVE-ROW-CHANGES ( [ buffer-index | buffer-name 
  [ , skip-list [ , no-lobs ] ] ] )
buffer-handle
A handle to a before-image buffer in a ProDataSet object.
buffer-index
An integer expression that specifies the index of the buffer in the data source’s buffer list. The default value is 1.
buffer-name
A CHARACTER expression that evaluates to the name of the buffer in the data source.
skip-list
An optional character expression that evaluates to a comma-separated list of field names for fields that should not be assigned after a new row is created (that is, fields to skip). For example, a key field or other fields assigned a value by a CREATE database trigger.
no-lobs
A logical expression indicating whether to ignore BLOB and CLOB fields in the save operation. If TRUE, BLOB and CLOB fields are ignored during the save operation. If FALSE, BLOB and CLOB fields are saved along with the other fields. The default value is FALSE (that is, BLOB and CLOB fields are included in the save operation).
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:
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.

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.