This documentation is archived and is not being maintained.

Edit Relation Dialog Box

Visual Studio .NET 2003

Allows you to create and edit relationships between tables that are in XML Schemas or ADO.NET datasets. Relationships in schemas and datasets are defined with a DataRelation object. Before a relationship can be created, there must be a column in the parent table that has a defined key node that can link to the child table. Relationships can then be added by dragging a Relation item from the XML Schema tab of the Toolbox onto the table. For more information, see Creating DataRelation Objects with the XML Designer.

DataRelation objects appear as lines on the design surface connecting the parent and child tables to a KeyRef object. Key and KeyRef statements are also added to the XML source code when you add a Relation item from the Toolbox to the designer. For more information, see Relational Data in XML Schemas.

Name
Specifies a name for this relationship. For example, if you are relating a Customers table to an Orders table, you could name the relation "CustomersOrders."
Parent Element
Represents the parent table to which the relationship is being established.
Child Element
Represents the child table to which the relationship is being established.
Key
Displays the keys defined in the table selected in the Parent Element drop-down list.
New button
Opens the Edit Key dialog box where new keys can be defined.
Parent Key Fields
Displays the key columns based on the selection in the Key drop-down list.
Foreign Key Fields
Displays elements that are members of the table selected in the Child Element box.
Create foreign key constraint only
When selected, allows you to enforce constraints only. Creating a 'constraint only' relation results in a slightly more efficient dataset with fewer methods in it. However you will not be able to access related records.
Update rule
Can be set to Default, None, Cascade, SetNull, or SetDefault.
Delete rule
Can be set to Default, None, Cascade, SetNull, or SetDefault.
Accept/Reject rule
Can be set to Default, None, Cascade or default.

See Also

Tables, Columns, Keys, and Constraints in XML Schemas | Relational Data in XML Schemas | Creating DataRelation Objects with the XML Designer

Show: