Progress
Basic Database
Tools
Schema>Modify Table
Choose Schema
Modify Table to change the structure of a table.
When you choose this option, Progress alphabetically lists all the tables defined for your database. After you select a table, a window similar to the one shown in Figure 9–1 appears.
Figure 9–1: Modify Table Window
![]()
Choose the Field Editor button to edit fields for the selected table. See the "Schema>Field Editor" section later in this chapter for more information.
This window contains the following user-interface elements:
Table Name
Specifies the name for the table. Table names can be up to 32 characters long and can consist of alphabetic characters, digits, and the characters $, &, #, %, -, and _. In addition, table names must begin with a letter (A–Z or a–z). You cannot use reserved Progress keywords as table names. Table names are not case sensitive.
Area
Displays the name of the storage area. The Area Name is assigned to a table when it is created. Because the Table Name cannot be updated, this field is disabled.
Table Type
Displays the table type. For this release, the only available table type is PROGRESS.
Label
Specifies the label used in error messages.
Owner
Displays the user ID of the table owner. This information is necessary for manipulating certain dataservers.
Replication
Specifies the name of the procedure that performs the replication for this table. For more information about replication, see the chapter on data replication in the Progress Database Administration Guide and Reference.
DataServer Name
Specifies the table name in the appropriate dataserver database if the table is not a Progress table.
DB Link
Specifies the link name for the distributed ORACLE database.
Description
Describes the table contents.
Hidden
Specifies if the table is a hidden table. The default value is no.
Frozen
Specifies if the table is frozen. You can freeze or unfreeze a table using the Freeze/Unfreeze option from the Utilities menu. When a table is frozen, you can only view its properties. The actual record data is not frozen, only the data definitions.
Dump File
Specifies the file to which you want to dump the table contents. The name must be unique among the other tables in the database and can be up to eight characters long. The default filename is the table name. If the table name is longer than eight characters, Progress truncates it to the first eight characters.
Record Size
Specifies the size of the record used for dataservers with fixed-length records.
The following sections describe the options that appear at the bottom of the window:
Table Validation Option
Choose the Validation option in the Modify Table dialog box to specify validation criteria and a message for record deletions.
NOTE: You should use table validation for backward compatibility for procedure-driven applications. For event-driven programs, Progress Software Corporation recommends that you use table delete triggers instead of table validation.If you choose the validation option, a dialog box similar to the one shown in Figure 9–2 appears.
Figure 9–2: Table Validation Dialog Box
![]()
This window contains the following user-interface elements:
Valmsg
Specifies the message Progress displays when a user tries an invalid deletion. There is no limit to the number of characters you can enter, but a message up to 63 characters long can fit onto the two message lines without scrolling.
Valexp
Specifies the criteria for valid deletions. For example, in the customer table, to restrict deleting customers to those customers who have no outstanding orders, enter the following criteria:
Table Triggers Option
Choose the Table Triggers option in the Modify Table dialog box to define schema triggers for a table. If you choose the Table Triggers option, a window similar to the one shown in Figure 9–3 appears.
Figure 9–3: Table Triggers Dialog Box
![]()
The Table Triggers dialog box contains the following user-interface elements:
Overridable?
Specifies whether a session trigger can override the schema trigger. The default value is no. See the Progress Programming Handbook for more information about schema and session triggers.
Check CRC?
Specifies whether Progress verifies the cyclical redundancy check (CRC) code. The default value is no. When Progress checks the code, it compares the stored CRC value of the procedure to the CRC of the trigger when it fires.
Choose the database event for the trigger you want to create. Table 9–2 lists the available database events.
For more information about replication, see the chapter on data replication in the Progress Database Administration Guide and Reference.
Press PUT to display the trigger code. Figure 9–4 shows an example of a delete trigger procedure.
Figure 9–4: Trigger Code Dialog Box
![]()
Table String Attributes Option
Choose the String Attributes option to control how much space Progress allocates within an r-code text segment for a string. It is important when you translate a string that you specify enough space for the translated string. String attributes can also specify the text justification within the r-code and whether or not the Translation Manager should translate the string. When you choose the String Attributes button, the Table String Attributes dialog box shown in Figure 9–5 appears.
Figure 9–5: Table String Attributes Dialog Box
![]()
This dialog box contains the following user-interface elements:
Label
Specifies the string attribute characters for the table label.
Validation Message
Specifies the string attribute characters for the table validation message.
Use the following syntax to enter the string attribute label:
Table 9–3 describes the string attribute control characters you can enter in the label field.
You can specify the characters in any order but can only use each character once. Also, you cannot use any of the letters in conjunction with each other, except for U. If you do not specify the maximum length, Progress uses the length of the original string.
If you do not specify justification, the Progress Compiler left-justifies the string by default, unless the string is a column label. If the string is a column label for a decimal or integer column or a side label, it is right justified.
Table 9–4 lists several examples of string attributes.
See the Character-String Literal reference entry in the Progress Language Reference for more information about string attributes and string translation.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |