Progress
AppBuilder
Developer’s Guide


Creating a SmartDataObject Master

The individual static SmartDataObjects you employ as building blocks in your application are instances of one or more master objects. Using the AppBuilder’s SmartDataObject design Wizard, you can create any number of masters that produce different data streams based on the queries you define in them.

Design Considerations

Before you start the SmartDataObject design Wizard, you should consider these questions:

Creating the Master

AppBuilder’s SmartDataObject Wizard has four pages. Only pages 2 and 3 involve significant work:

  1. Introduction
  2. Creating the temp-tables, if any, and the query
  3. Selecting the fields the SmartDataObject will offer to visualization objects
  4. Congratulations

To create a SmartDataObject master, follow these steps:

  1. Open the Choose dialog box by clicking on the SmartDataObject tool icon in the Object Palette. When the dialog box opens, start the SmartDataObject Wizard by choosing New:
  2. NOTE: You could also start the Wizard by choosing File New and selecting the SmartDataObject item from the list, or by right-clicking the icon in the Palette and selecting New SmartDataObject from the pop-up menu.

  3. Page 1 of the SmartDataObject Wizard appears:
  4. When you have read the introductory text, choose Next to move to page 2:
  5. If this SmartDataObject will operate on one or more temp-tables, choose the Define temp-tables button to open the Temp-Tables Maintenance editor. Using the editor, define the temp-tables this SmartDataObject will use. See the "Temp-Tables Maintenance" section in "Frequently Used Dialogs," for information about how to use the editor.
  6. Choose the Define Query button to start Query Builder. Define the base query this SmartDataObject will use. See the section "Defining and Editing Queries Using Query Builder" in this chapter, for information about how to use Query Builder.
  7. NOTE: The option to create a free-form query is not available to you at this stage. If you need or want to create a free-form query, you must create a placeholder using Query Builder and then edit the query after the Wizard completes. See the "Editing a SmartDataObject Master" section in this chapter, for further information.

  8. When you finish with Query Builder, you will see displayed on page 2 the text of the query you just created. When you are satisfied with your choices for temp-tables and query, choose Next to go to page 3 of the Wizard:
  9. Note that at this point, the list of fields is empty. Choose Add Fields to start the Column Editor, and use the editor to select the fields that you want to make available through this SmartDataObject. For information about how to use the Column Editor, see the "Selecting Database Fields for Browsing" section in this chapter.
  10. When you return from the Column Editor, the list will be populated with the fields you have chosen:
  11. Choose Next on page 3 of the Wizard to advance to the Wizard’s final page. If you successfully defined a database query and the related SmartDataObject RowObject temp-table fields, the Congratulatory screen displays. (If not, press the Back button and make any necessary changes.)
  12. Choose Finish to dismiss the Wizard and reveal the new SmartDataObject master, if it was not already visible:
  13. Choose File Save and give the new master a descriptive filename. Note that, by convention, SmartDataObject filenames begin with d.
  14. The new SmartDataObject master is now available for your use.

    Note, too, that AppBuilder actually creates two different forms of the master. If you were to give it the name dExampleSDO and then check the filesystem, you would see

    • A standalone version, named dExampleSDO.w This version is loaded whenever there is a local database connection. AppBuilder creates it with the DB–REQUIRED preprocessor value set to YES, since it should not load if there is no database connection.
    • A client-side version, named dExampleSDO_cl.w. AppBuilder creates it with DB–REQUIRED set to NO. This version is loaded when there is no local database connection, on the presumption that the application is running in client/server mode and the database is resident on the server side. This version is compiled with all DB–REQUIRED internal procedures stripped out, which can create a problem. See "Data Validation Limitation" in this chapter for further information.

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