Writer instructions | ||
Purpose | Use this page to display a banner announcement on each page of the space. Create the Space announcements page in the master space, outside of the Home branch. You can version the Space announcements page to enable different banners to be published into different target spaces, however, the banner that is displayed in the versioned (master) space itself only displays the most recently-published banner. If you find errors in the banner area of your versioned space and you are sure the Space announcements page is set up correctly, try publishing the page to the same space. For more information, see Space-announcements-banners. | |
Removing | When an announcement is no longer needed, remove the BMC Space Banner macro. | |
Translation | Localized spaces using the L10n Viewport theme must change the name of this page to Space announcements l10n. See Configuring-the-Scroll-ViewPort-theme-for-translated-spaces. | |
Usage | Choose one or none of the following BMC Space Banner macros. If your space requires another kind of announcement, you can use this page in coordination with your team lead and editors. |
Referential Integrity Errors
If you encounter a Referential Integrity (RI) error while updating or inserting a row, File-AID for Db2 assists you in resolving the error without leaving your edit session.
The department table (DEPT) is the parent table and the employee table (EMP) is the dependent table. The DEPTNO column in the DEPT table is the primary key. The WORKDEPT column in the EMP table is a foreign key; it refers to the DEPTNO column. Every WORKDEPT number in the employee table must exist in the department table. The following table shows the relationship.
Sample Relationship
Parent Table | Primary Key | Dependent Table | Foreign Key |
---|---|---|---|
DEPT | DEPTNO | EMP | WORKDEPT |
Inserting a Row into the Employee Table
Inserting a Row into the Employee Table shows a new row being inserted into the employee table. The RI Relationship Error window (RI Relationship Error Window) displays when File-AID for Db2 encounters a -530 referential integrity error.
RI Relationship Error Window
RI Relationship Error Window shows an SQL error because the WORKDEPT entered is not a department in the parent table, DEPT. The row in error moves to the top of the display and is flagged with ==ERR> in the line command area. The window displays the Db2 error message and code. You can also enter the maximum number of rows to select. The column and data in error are identified. You can issue the UP and DOWN commands to view up to 64 foreign key columns. The first 40 characters of the Data in Error field are displayed to identify the problem. Data beyond this limit is not shown.
To resolve the RI error, you can do one of the following:
- Press Enter on this screen to browse the parent table and select the correct data. See RI Browse Window for more information.
- Enter END to exit the window and return to the edit session. Then, you can edit the parent table by issuing the EDIT primary command and add the correct data. See Editing-Multiple-Unrelated-Tables for more information.
RI Browse Window
Once the RI Browse window displays, you can resolve the RI error by selecting a row from the parent table. When you select a row, the data in the primary key column (DEPTNO) replaces the data in the dependent table’s foreign key column (WORKDEPT). See Resolving RI Errors in Table Mode to resolve the error in table mode. See Resolving RI Errors in Row Mode to resolve the error in row mode.
You can only issue standard browse mode commands from the RI Browse window. You cannot issue Related Table Edit commands (REDIT, RBROWSE, JUMP, MAX, and MIN).
Primary key columns are left justified and highlighted.
Resolving RI Errors in Table Mode
Use the RI line command to select the row containing the desired column data.
RI Browse Window — Using the RI Line Command
RI Browse Window — Using the RI Line Command shows the user selecting department number E21 by typing RI in the line number area. Press Enter to automatically replace the data in error, E12, with the new work department, E21. The following figure shows the RI error resolved.
RI Error Resolved — Table Mode
Once you have resolved the referential integrity error, you can continue your edit session.
Resolving RI Errors in Row Mode
Use the RI primary command to select the row containing the desired column data.
RI Browse Window — Entering the RI Primary Command
RI Browse Window — Entering the RI Primary Command shows the user selecting department number E21 by typing RI in the COMMAND field. Press Enter to automatically replace the data in error, E12, with the new work department, E21. The following figure shows the RI error resolved.
RI Error Resolved — Row Mode
Once you have resolved the referential integrity error, you can continue your edit session.
Resolving Multiple Errors
If multiple RI errors are flagged, File-AID for Db2 displays the RI Relationship Error window (RI Relationship Error Window) for every error encountered. That is, after resolving the first error, it reappears whenever you attempt to scroll, enter a command, or press Enter. To resolve the error, you can:
- Press Enter to display the RI Browse window and issue the RI line or primary command.
- Enter END to return to the edit session and type over the data.
- Enter END to return to the edit session and issue a CHANGE or CANCEL command.
Related topics