Defining column attribute overrides

The following procedure describes how to define column attribute overrides for a:

To define column attribute overrides for a table or stored procedure

  1. In the Database Interface Designer, open the .mdq file.
  2. In the Navigator, select the database containing the table for which you want to generate a type tree with column attribute overrides.
  3. From the Database menu, select either Generate Tree From > Table or Generate Tree From > Procedure, depending upon the one you are generating.

    Either the Generate Type Tree from Tables or Generate Type Tree from Procedures dialog appears, depending upon your selection. An example of the Generate Type Tree from Tables dialog follows. For more information about the type tree generation dialogs, see the Database Interface Designer documentation.

  4. Select one or more tables, views, or procedures for which you want to generate a type tree.
  5. Enter a name for the type tree file (.mtt)

    or

  6. Enable one of the Type options to specify how you want the newly generated types to be saved.
  7. From the Row group format list, enable Delimited or Fixed.
  8. Accept the default values for the Group options fields (Delimiter, Terminator, and Release) or change them.
  9. To specify how columns are to be interpreted, select the Override column definitions check box.
  10. Click Generate.

    The Column Datatype Specification dialog appears.

  11. From the Tables/Views list, select the table or view containing the column or columns for which you want specify an override.
  12. From the Columns list, select the column for which you want to specify an override.
  13. Specify the Subclass, Interpret as, Presentation, and Length values for the selected column. For more information about setting these attributes, see the Type Designer documentation. In most cases, the specified length should not be shorter than the default length because this might result in data truncation errors.
  14. Repeat Steps 11-13 for each column for which you want to specify an override.
  15. When finished, click OK.

To define column definition overrides for a query

  1. In the Database Interface Designer, open the .mdq file.
  2. In the Navigator, select the query for which you want to generate a type tree.
  3. From the Queries menu, choose Generate Tree.

    The Generate Type Tree from Query dialog appears, an example of which follows. For details on the type tree generation dialog, see the Database Interface Designer documentation.

  4. Enter a name for the type tree file (.mtt)

    or

  5. To specify the way you want to save the newly generated types, enable one of the Type options check boxes.
  6. From the Row group format list, enable either Delimited or Fixed.
  7. Accept the default values for the Group options fields (Delimiter, Terminator, and Release) or change them.
  8. To specify how columns are to be interpreted, select the Override column definitions check box.
  9. Click OK.

    The Column Datatype Specification dialog appears.

  10. From the Columns list, select the column for which you want to specify an override.
  11. Specify the Subclass, Interpret as, Presentation, and Length values for the selected column as desired. For more information about setting these attributes, see the Type Designer documentation. In most cases, the specified length should not be shorter than the default length because this might result in data truncation errors.
  12. Repeat Steps 10-11 for each column for which you want to specify an override.
  13. Click OK.