Im using BDE….
How can i sort a table by given field?
Im using BDE…. How can i sort a table by given field?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
So, firstly my assumtion is you are using a TTable component.
Easy way…
Use a TQuery component instead of a TTable component and let the database do the heavy lifting for you with a order by clause.
Hard way….
you can use the DbiSortTable function (declared in the DbiProcs.int file) you can google that for some sample code.
Now, having said all of that, if you have the opportunity, you should think about migrating away from the BDE, it’s deprecated and there are vastly better database connectivity mechanisms available for Delphi, Embarcadero would recommend DBEXpress as a better way to go.