Solved

Sort the detail dataset

Posted on 1998-08-26
3
156 Views
Last Modified: 2010-04-04
I have two tables linked by fields 'id' and 'doc_id' which produces the correct search results but when I sort detail table, relationship go broken.

How I may sort detail dataset without TQuery component?
(TQuery very slowly on Local DB)
0
Comment
Question by:Jam
  • 2
3 Comments
 

Author Comment

by:Jam
ID: 1337831
Edited text of question
0
 

Author Comment

by:Jam
ID: 1337832
Adjusted points to 75
0
 
LVL 1

Accepted Solution

by:
AndersWP earned 70 total points
ID: 1337833
You can do it be using an index for the detail table. Suppose your detail table has four fields: DOC_ID, DATE, TITLE and TEXT ( this is just an example) and that it is linked to field ID in the master table. To show the detail records sorted by DATE, you create an index for the detail table over the fields (DOC_ID, DATE) in that order. Depending on the database you are using, you should then set either the IndexFieldNames property of you detail TTable object to DOC_ID, DATE or the IndexFile property to the name of your index.
You can sort the detail table by TITLE by creating a (DOC_ID, TITLE) index etc. You can swicth from one sort to the other by changing the IndexFieldNames property at run-time. If you do this, you may need to do a Refresh on either the master or the detail table.

I hope this will help you.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now