Previous Next

MARK-ROW-STATE( ) method
Forces the creation of before-table records and assigns ROW-STATE.
Return type:
Applies to:
If a ProDataSet contains changes to be applied to a data-source, but no BEFORE-TABLE records exist for it and therefore no ROW-STATE, you may still want to use the SAVE-ROW-CHANGES( ) method to move the new data from the ProDataSet to the source database. However, this is problematic, since SAVE-ROW-CHANGES( ) requires a before-table record with a ROW-STATE for each record to be saved. This method creates the before-table records needed by SAVE-ROW-CHANGES( ).
 
Syntax 
MARK-ROW-STATE ( row-state [ , before-image-source-buffer-handle ] )
row-state
An integer expression evaluating to one of the row-state values or one of the compiler constants ROW-CREATED, ROW-MODIFIED or ROW-DELETED shown in Table 89.
 
Table 89:
before-image-source-buffer-handle
An optional handle to the before-image source buffer.
If row-state is ROW-UNMODIFIED, or if there is already a before-table record, no action is taken.
If row-state is ROW-CREATED, a before-table record is created and its ROW-STATE is marked as ROW-CREATED. The before-table record is associated with the buffer object handle record.
If row-state is ROW-MODIFIED and the second optional parameter is defined, a before-image record is created by copying the before-image source buffer. If the second parameter is not defined, then a data-source must be attached to the buffer object handle. In this case the data-source mapping is used to locate the data-source record(s) related to the buffer object handle, which is used to create a before-table record. The before-table record is marked ROW-MODIFIED and is associated with the buffer object handle record.
Note:
If row-state is ROW-DELETED and the second optional parameter is defined, a before-image record is created by copying the before-image source buffer. If the second parameter is not defined, then a data-source must be attached to buffer object handle. In this case the data-source mapping is used to locate the data-source record(s) related to buffer object handle, which then can be used to create a before-table record.
If a second parameter is not defined, then the buffer object handle must contain a temporary record whose only purpose is to locate the data-source. Otherwise it can be empty.
Note that if buffer object handle is for a static table that was defined without a BEFORE-TABLE option, MARK-ROW-STATE( ) causes the AVM to raise ERROR. If buffer object handle is for a dynamic table that has no before-table, one is automatically created.
See also:

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