Progress
ADM 2 Guide
Nondata Fields in the RowObject and RowObjUpd Temp–tables
A RowObject temp–table contains more than just fields selected from database tables. It also contains the following information:
For example:
Note that the RowObject temp–table contains three special fields named RowNum, RowIdent, and RowMod. These fields. which are maintained by the SmartDataObject support code, are used to manage queries and updates as follows:
- RowNum—An integer value that represents the sequence number of the row within the query’s result set. A unique value is assigned to each row as it is added to the table; it is used basically to keep the rows in a consistent sort order. The values begin arbitrarily with 900,000, which generally assures that the values of this field remain positive whether the temp–table is built forward or backward.
- RowIdent—A character field that contains a comma-separated list of the ROWIDs of the database records from which the RowObject row is derived. The database ROWIDs are used to re-retrieve the records from the database when performing an update. Note that if the records in the RowObject temp–table result from a join, the ROWIDs in this field are a combination of the ROWIDs for the joined tables.
- RowMod—A character field that contains a one-character code that indicates the kind of update operation performed on a row:
- For a newly added row, RowMod is set to “A” if the row results from an Add operation or “C” if it is results from a Copy operation.
- For a row that is to be deleted, RowMod is set to “D”.
- An Update operation returns two rows: a copy of the row as it was received, for which RowMod is set to “”, and the row with its changes, for which RowMod is set to “U”. The copy of the row as received is used to verify that the corresponding database records have not been changed since the user accessed the row, and the row with changes is used to update the database.
The RowObjUpd temp–table contains the same fields as the RowObject temp–table plus the ChangedFields field, which is used only for updates:
- ChangedFields (RowObjUpd temp–table only)—A character field that contains a comma-separated list of the names of all SmartDataObject columns in the current row that have been modified. This list is used to ensure that only those fields that have not previously been changed are written back to the database, in order to minimize interference between different users of an application who might be changing different fields in the same record. This field is maintained automatically by the SmartDataObject support code regardless of how each field’s value may have been changed.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |