|Top Previous Next|
This component is used for accessing a DB table using ADO. The component has the following properties:
These properties are similar to those of Delphi's “TADOTable” component. To connect the component to a DB table just set the “DatabaseName” and “TableName” properties. The Table is opened either by setting “Active” property to True or by calling the “Open” method.
The “FieldAliases” property editor is opened from the object inspector or by double-clicking on the component. The editor allows the selection of which fields will become available for use in code and the setting of aliases for these fields and for the dataset as a whole.
The “MasterFields” property editor is used for creating master-detail connections between two tables. To connect two tables with the master-detail relation a second table must be set in the “Master” property of the dependent table and the “MasterFields” property editor opened. If the table has secondary indexes which are to be used then set the “IndexName” property beforehand.
The editor visually binds the “master” and the “detail” fields of the datasets. When two datasets are connected in a “Master-Detail” relationship movement within the master dataset automatically filters the detail dataset so that only records belonging to the current record of the master dataset are shown.
To connect fields in the two datasets select a field from the list on the left (the detail dataset) then a field from the list on the right (the master dataset) and click the Add button. The link between the two fields is then displayed in the bottom list. To clear the bottom list use the Clear button. The linked fields must of compatible type and be indexed.