Creating Master-Detail Relationships

From RAD Studio
Jump to: navigation, search

Go Up to Using Table Type Datasets

Table type datasets can be linked into master/detail relationships. When you set up a master/detail relationship, you link two datasets so that all the records of one (the detail) always correspond to the single current record in the other (the master).

Table type datasets support master/detail relationships in two very distinct ways:

Each of these approaches has its unique advantages. Linking cursors lets you create master/detail relationships where the master table is any type of dataset. With nested details, the type of dataset that can act as the detail table is limited, but they provide for more options in how to display the data. If the master is a client dataset, nested details provide a more robust mechanism for applying cached updates.

Note: No more than 64 master-detail relationships can be supported. For example, if aTClientDataSet contains more than 64 TSQLTable components with master-detail relationships, an error message might appear, such as "Operation not applicable".

See Also