If the user chooses an indirect link at the second step of link creating wizard, he or she should specify at the third step which GDB table should be used as a cross one (figure 43-6).
Figure 43-6. Link creating wizard, page “Selecting cross table”
The list of offered GDB tables contains only those tables with which the present feature type has a unique link.
At the next step (figure 43-7) setting of fields of indirect link is performed.
Figure 43-7. Link creating wizard, page “Setting indirect link fields”
The setting is forming a set of fields of indirect link. It is necessary to associate a field of compatible type in EDB table/query with each of fields of indirect link from the cross table.
The lower part of the page displays a list of all fields of cross table. When the user chooses one of these fields, fields of EDB table or query being linked compatible with it by the type are displayed on the right.
Since types of fields determined in ObjectLand do not coincide with the types used in ODBC, admissibility of matching fields is determined as it is shown in table 43-1.
Type of field | Type of field in table/query of EDB |
String | CHAR, VARCHAR |
Integer number | SMALLINT; INTEGER, DECIMAL(p,s); NUMERIC(p,s), s=0 |
Real number | REAL, FLOAT, DOUBLE PRECISION |
Boolean value | BIT |
Date | DATE |
Time | TIME |
Timestamp | TIMESTAMP |
Feature | Using of the field type “Feature” as a field of indirect link is not allowed |
Table 43-1. Correspondence of field types for indirect link
If for the field selected in the left list no admissible field is displayed on the right, it means that selected field cannot be used as a field of indirect link.
If a reference table is set for one or several fields in linked EDB query, compatibility with fields is determined not by the value of the reference table, but by its code.
When a pair of matched fields is selected in the lower part of the page (a field from linked table/query of EDB and a field from cross table), the button
is enabled. Pushing this button causes transfer of selected pair of fields into the upper pane, where a list of selected fields of indirect link is displayed. The button
allows excluding the selected pair of fields from the list.
When a list of fields of indirect link is formed, it is necessary to pass to the last step of link creating wizard, where the user should choose mode of linking and mode of unlinking (for the case when the created link will be removed in future). These modes indicate which operations should be performed with the record of cross table when the link between the record of EDB table/query and the feature is set or broken. The corresponding page of the wizard is shown at figure 43-8.
Figure 43-8. Link creating wizard, page “Modes of linking and unlinking” for indirect link
Mode of linking is determined by the state of two checkboxes:
Add record to cross table – if the box is checked, before setting a link between a feature and a record ObjectLand adds a record into the cross table and sets values of all fields of indirect link of this record equal to the values of matched fields in the record of EDB table/query being linked. Other record fields of the cross table remain empty.
Look for a record in cross table – if this box is checked, search of a record in cross table is performed by values of fields of indirect link in the record of EDB table/query being linked. If the record with specified values of fields is found in the cross table, the feature linked with the found record is considered to be linked with the record of EDB table/query as well. Otherwise, ObjectLand informs the user about impossibility to set a link.
If both boxes are checked, search of record in the cross table is performed in the first place and if the record is not found, a new record is added into the cross table.
At least one of the two boxes should be checked, because if not, it would be impossible to set a link. By default both boxes are checked.
When the link between the feature and the record of EDB table/query is removed, removing of the link of this feature with the corresponding record (by values of fields of indirect link) of the cross table is performed. Additional actions are executed if the box is checked:
Remove record from cross table – when breaking the link between the present record of EDB table/query and the feature, apart from breaking of the link with the cross table, removal of this record is performed.
By default the record in the cross table is not removed.