RAD Studio |  |

Setting Up Master/Detail Linked Relationships
See Also
Collapse All

There are two ways to use linked datasets to set up a master/detail relationship with a dbExpress dataset as the detail set. Which method you use depends on the type of unidirectional dataset you are using. Once you have set up such a relationship, the unidirectional dataset (the "many" in a one-to-many relationship) provides access only to those records that correspond to the current record on the master set (the "one" in the one-to-many relationship).

TSQLDataSet and TSQLQuery require you to use a parameterized query to establish a master/detail relationship. This is the technique for creating such relationships on all query-type datasets. For details on creating master/detail relationships with query-type datasets, see Establishing master/detail relationships using parameters.

To set up a master/detail relationship where the detail set is an instance of TSQLTable, use the MasterSource and MasterFields properties, just as you would with any other table-type dataset. For details on creating master/detail relationships with table-type datasets, see Creating Master/detail Relationships.

See Also

Connecting to the Database Server

Types of dbExpress Datasets

Specifying What Data to Display

Executing Commands That Do Not Return Records

Accessing Schema Information

Fetching the Data

Debugging dbExpress Applications

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!