Release 10.1A: OpenEdge Development:
Progress 4GL Reference

> ## 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``

> 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.

> Progress 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, Progress 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, Progress 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, Progress 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, Progress copies the ProDataSet buffer or field to the data source. If the data in the ProDataSet buffer or field was deleted, Progress deletes the data from the data source.

> If the data in the data source has changed, Progress saves the ProDataSet buffer changes based on the current PREFER-DATASET attribute setting. When PREFER-DATASET is TRUE, Progress 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, Progress does not copy the data from the ProDataSet buffer or field to the data source. Progress 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 Progress 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.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095