How to: Manage Persistent Relationships Between Tables
Visual FoxPro 9.0 SP2 |
How to: Manage Persistent Relationships Between Tables |
See Also |
You can edit and delete persistent relationships between database tables.
To edit a persistent relationship between tables
-
Open the database in the Database Designer.
-
In the Database Designer, click the relationship line between the two tables.
-
On the Database menu, click Edit Relationship.
Tip
You can also double-click the relationship line between the two tables.
-
In the Edit Relationship dialog box, change the settings you want.
For more information, see Edit Relationship Dialog Box.
To delete a persistent relationship between tables
-
Open the database in the Database Designer.
-
In the Database Designer, click the relationship line between the two tables.
-
Press the DELETE key.
For more information, see Database Designer (Visual FoxPro).
To delete a persistent relationship between tables programmatically
-
Use the ALTER TABLE command and include the DROP FOREIGN KEY clause.
For more information, see ALTER TABLE - SQL Command.
For example, the following code deletes a persistent relationship between two tables, Customer and Orders, based on the primary index key, Cust_ID, in the Customer table and a foreign key, Cust_ID, in the Orders table:
![]() | |
---|---|
ALTER TABLE Orders DROP FOREIGN KEY TAG Cust_ID SAVE |
See Also
© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic