ComponentOne True DataControl 8.0
Using True DataControl with Master-Detail (hierarchical) ADO Recordsets

True DataControl honors master-detail relationships between ADO recordsets. Hierarchical (master-detail) recordsets can be created with Microsoft SHAPE data provider and with Visual Basic DataEnvironment.

When two recordsets, one designated as the master and the other as the detail, are assigned to two TData controls (by setting their SourceRecordset property in code), we have two TData controls in a master-detail relationship. When the master control is positioned to a record, the detail control refreshes its recordset data accordingly.

This behavior is a consequence of the general rule that True DataControl reacts to a change of its SourceRecordset as a whole, refreshing its data. For more information, see Modifying SourceRecordset from code.

However, this sort of master-detail relationship is different from the True DataControl native master-detail, which must be specified explicitly by setting the Master property of a TData control. A TData control does not become the Master of another TData control simply because its SourceRecordset is set to a master recordset.

Although True DataControl honors the ADO/OLE DB hierarchy, we recommend using True DataControl native features for establishing a master-detail relationship, including the Master property and Field Range Conditions, which are more powerful and versatile than standard ADO master-detail.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback