Solved

Sort the detail dataset

Posted on 1998-08-26
3
158 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

803 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