Board index » delphi » Master/Detail with 2 TQuery Objects...

Master/Detail with 2 TQuery Objects...

setup:  i have two grids which present a master/detail relationship view using two ttable
objects.  i now want to use two tquery objects in order to utilize the flexibility
of sql to filter the data.

what is the sql that must be used with the detail tquery object so that it retrieves
only the detail rows associated with the currently selected master row?

note:  the primary and foreign key is the 'ContactID' field.

 

Re:Master/Detail with 2 TQuery Objects...


You can tie the master to a datasource and set the DataSource property of
the Detail SQL.  This will perform the Master/Detail operation you desire.

John Elrick

Quote
patrick allen <pal...@fred.net> wrote in message news:37f24615@newsgroups...

> setup:  i have two grids which present a master/detail relationship view
using two ttable
> objects.  i now want to use two tquery objects in order to utilize the
flexibility
> of sql to filter the data.

> what is the sql that must be used with the detail tquery object so that it
retrieves
> only the detail rows associated with the currently selected master row?

> note:  the primary and foreign key is the 'ContactID' field.

Other Threads