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
handle
buffer-index
buffer-name
skip-list
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).Caution: If another user did change a LOB field since you read the record, the assignment might not be appropriate. You get no warning of such problems with this option. Therefore, before using this option, you must understand the nature of your data and be sure that using this option will not result in inconsistent or out-of-date data in the database.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
|