Progress
ADM 2 Guide
SmartDataObjects
The SmartDataObject accesses a database directly. It transfers rows, as defined by its database query, to a temp–table called RowObject one batch at a time. (Fields from one or more tables can be joined into a single result table.) For a discussion of the RowObject temp–table, see the "SmartDataObject Query and Update Operations" section in Developing Your Application’s Business Logic."
Once the RowObject temp–table has been built, the SmartDataObject presents its rows to SmartDataViewers, SmartDataBrowsers, and other client objects. The SmartDataObject thus insulates the client objects from the database specifics.
Note that when a SmartDataObject reads a data set into a RowObject temp–table, it provides essentially a snapshot of the current state of the data set, often called a view. The RowObject temp–table does not necessarily reflect updates to the data set that are made by other users in another session; however, any code that executes the openQuery procedure on the data set automatically refreshes the RowObject temp–table with the latest data. Alternatively, you can use the refreshRow function on the current row to get the latest data.
You can customize various field-related properties of a SmartDataObject to meet your own application needs:
- Select which fields will be a part of the data set presented to other client objects.
- Change the field names.
- Determine which fields the SmartDataObject allows client objects to update.
- Change formats and other field attributes.
- Use calculated fields to express a calculation based on other fields in the RowObject temp–table or as a placeholder for information to be passed to or from client objects that use the SmartDataObject.
SmartDataObjects support update validation logic beyond that defined in the Data Dictionary or in database triggers. For more information, see Developing Your Application’s Business Logic."
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |