Board index » delphi » Master-Detail and Indexes

Master-Detail and Indexes

I have Two tables.

CustID,Name  // master
DtlID, Cust,Date, Description // detail

Plus the index (DateX on Date)  and (CustX on Cust) Fields.
When joining two using TTables on CustID-->Cust
the details tables is sorted by Cust Field becouse of  CustX
index. But how one use other Index when joining two tables?
Of course using query would do that but what if i want to be able
to edit data in the grid?
Thanks a lot, Azret.


Re:Master-Detail and Indexes

Replace the index on Cust in the detail table with an index on Cust and
Date. Use that index for the link.  Now the detail records for each customer
will be sorted by date.

Bill Todd
(Sorry but TeamB cannot answer questions received via email)
(Remove nospam from my email address to contact me for any other reason)

Other Threads