?
Solved

sort records of table

Posted on 2005-02-24
5
Medium Priority
?
264 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
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses
Course of the Month8 days, 3 hours left to enroll

616 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