Progress
ADM 2 Guide
Update Operations and the RowObjUpd Temp–table
SmartDataObject update operations require an additional Progress temp–table called RowObjUpd. This temp–table, a copy of the RowObject temp–table, is used for handling all types of changes to data rows: updating existing rows, adding rows, and deleting rows:
- When an existing row is updated, Progress creates in RowObjUpd a before image of the row; that is, the row with its original row values, as it appeared before the update. When the update is committed, the updated version of the row is also written to the RowObjUpd table. The server-side code uses the before image to verify that the row’s data has not been changed by another user since it was read, then uses the new values to make the updates to the database.
- When a row is added and the add is committed, the new row is written to the RowObjUpd table.
- When a row is deleted, the deleted row is removed from the RowObject table and written to the RowObjUpd table to be passed to the server.
The SmartDataObject transfers updated and newly added rows back to the database when it receives a Commit request. Depending on how the SmartDataObject’s AutoCommit property is set, the commit can be performed either automatically when an update is received (the default behavior) or when a specific Commit request is received after a set of updates have been made. The default behavior is the typical usage; however, to change to the nondefault behavior, set the SmartDataObject’s AutoCommit property to NO. (For details, see the "Commit SmartPanel" section in Data Management in the ADM.")
When a change is committed, the RowObjUpd temp–table is passed back to the server (if the SmartDataObject is divided between client and AppServer), and the code in serverCommit reads the table and makes the appropriate changes to the database. (See the field description of RowMod in the "Nondata Fields in the RowObject and RowObjUpd Temp–tables" section for details.)
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |