To define relationships between tables in the Data Set

  1. Once you have defined primary keys for each DataTable, select the DataSet in the Component Tray if it is not already selected.
  2. Click the ellipsis (...) button next to the Relations property in the Object Inspector.

This displays the blank Relations Collection Editor dialog.

This displays the Relation editor dialog

  1. From the Parent table and Child table dropdown lists, choose the tables you want to relate.
  2. Click the Key Columns field to choose a Primary Key column from the list of column names from the parent table.
  3. Click the Foreign Key Columns field to choose a Foreign Key column from the list of column names from the child table.

Note: If you have already performed this procedure while setting constraints for your DataTables, you may find that all of the appropriate values are already established.

Warning: The primary key and foreign key columns must have the same data type and must contain unique values. Columns that can contain duplicates are not good choices for primary or foreign keys. It is common to choose the same column name from each table for your primary-foreign key relationship.

  1. Click OK.
  2. Repeat the process to define additional relations between the same DataTables.
Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook


Post a comment