Getting Started


Defining the CUSTOMER VAGen Record Part

Here you define the VAGen Record part as an SQL row record and use the CUSTOMER table definition in the relational database catalog to define the contents of the record.

Note:If you have already completed the steps in Chapter 11, "Defining an SQL record", the next five steps will be redundant. (Do not repeat the steps if you completed them earlier.) Step 6 in this section is not redundant, so be sure to follow it and customize the data item descriptions.
  1. In the Record Editor, select SQL row from the Record Type drop-down list box.

    VisualAge Generator supports accessing a variety of file types and databases.

    In this case, you are going to access a relational database table, so you selected SQL row as the record type.

  2. From the Define menu, select Properties.

    The SQL Row Properties window is displayed.

  3. Select Insert.

    A blinking cursor is displayed in the Name field.

  4. In the Name field, type customer and select OK.

    The SQL Row Properties window closes.

  5. From the Tools menu, select Retrieve SQL.
    Note:If a message window is displayed, indicating that the system cannot locate a database access plan, select Yes to have a plan created.

    If you have not already connected to the database, you will be prompted for an ID and Password. Enter the ID and Password you used in setting up your database.

    The table definition information is retrieved from the relational database catalog and used to create data item definitions for the record.

  6. Customize the descriptions of data items in the SQL row record so that you can use them as field labels later. For each data item in the record,, select the Description field and type descriptions for the data item names as follows:

    Name
    Description

    CUSNUM
    Customer Number

    CUSNAME
    Customer Name

    CUSSTATUS
    Customer Status

    CUSLIMIT
    Customer Limit

    CUSCONTACT
    Contact

    CUSPHONE
    Phone

    CUSSTREET
    Street

    CUSCITY
    City

    CUSTATE
    State

    CUSZIP
    Zip
    Note:You may need to maximize the Record Editor in order to view the Description fields.
  7. Select File>Save.
  8. Close the Record Editor.

For more information about defining records, refer to the VisualAge Generator help facility.

Now that you've defined an SQL Row record and assigned data item descriptions, you're ready to add fields to the Customer Information window and define connections to the record. Data items in the CUSTOMER record will be visually connected to parts of the Window with a blue line, indicating an attribute-to-attribute connection. With this type of connection:


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]