Re: Master / detail with TADODataset?




> is it actually possible to establish master/detail relationships in a
> simple way between 2 TADODatasets? I mean like between 2
> TADOTables. I would like to avoid using TADOTable as long
> as possible, but i haven't the MasterSource property in a
> TADODataset, though i have MasterFields.
>

Yes easily, use Datasource property.
Set the Details.Datasource to a datasource linked to the Master, and the
Details.MasterFields to the name(s) of the Master fields. If Details has
different field names to the Master then set Details.IndexFieldNames to the
matching Details fields.

HTH
Dave


.



Relevant Pages

  • Either BOF or EOF is True
    ... Using Delphi 7 Enterprise and SQL Express 2005 ... I have 2 TADOTables in master - detail ... records in master and I try to populate the detail table with 5 records and after filling the records for the first record in master Delphi stops with: ...
    (borland.public.delphi.database.ado)
  • Re: Master / detail with TADODataset?
    ... informática Green Service SA ... > Yes easily, use Datasource property. ... > and the Details.MasterFields to the nameof the Master fields. ... > matching Details fields. ...
    (borland.public.delphi.database.ado)