Describes relations between the fields of the table. An instance of this object can be retrieved with the help of the CreateRelation method of the Database object or from the Relations collection.
Name | The name of the object for indentification in the collection. |
Table | The name of the table that contains the primary key. |
ForeignTable | The name of the table, to create relation with. |
CreateField | Defines the Field object, on which the given relation will be based. |
CreateProperty | Creates a Property object, that describes a user-defined property. |
Fields | Provides access to the Fields collection. |
Properties | Provides access to the Properties collection. |
The Relation object can be based only on the fields of the table, specified in Table, relating to the primary field of this table.
For all created Field objects, the ForeignName property must be defined - it represents the name of the field in the table, being related, on which the external key will be based. The number of fields in the primary and external keys must be the same - i.e., all created fields must have different names and ForeignName properties.
The created fields are added to the Fields collection with the Append method.
The Relation object is created in the database on calling the Append method of the Relations collection.
See Also |
Database Object, Field Object, Fields Object, Property Object, Properties Object, Relations Object, Append Method, CreateRelation Method, ForeignName Property. |