?
Solved

sort records of table

Posted on 2005-02-24
5
Medium Priority
?
263 Views
Last Modified: 2010-04-05
How do you sort the table after open (asc/desc) and how do you
filter records?
Example :I want to display customerID of only those customers
who are 'sane'. Those 'not sane' we leave out....he,
Can filter be done in object inspector (on the dataset)??
0
Comment
Question by:srbenavrbe
[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
5 Comments
 
LVL 6

Expert Comment

by:Imthiyaz_ph
ID: 13392101
In Object inspector, set the Filter property to : customerID = 'sane'
and set the Filtered property to True.
0
 
LVL 6

Expert Comment

by:Imthiyaz_ph
ID: 13392113
one more thing, replace the field customerID of the filter with the appropriate field.
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 13392697
for sorting you need an index on the field in the needed order
(means one for asc and one for desc) and set the indexname-property

easier would be a query with an order by clause as dataset

meikl ;-)
0
 

Author Comment

by:srbenavrbe
ID: 13408835
how do you sort records on afteropen of the table ?
0
 
LVL 1

Accepted Solution

by:
Qosai_DBA earned 200 total points
ID: 13409325
Hi srbenavrbe ,
To sort records after Open the table you can use:

ADOTable1.Open;
ADOTable1.Sort:= 'Field_Name ASC';

as you see the example on ADO Table.

Regards,
Khalid
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month11 days, 14 hours left to enroll

752 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