Solved

Sort the detail dataset

Posted on 1998-08-26
3
167 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses
Course of the Month9 days, 1 hour left to enroll

617 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