Armin Taghavizad
Armin Taghavizad

Reputation: 1685

BDE table sorting

Im using BDE.... How can i sort a table by given field?

Upvotes: 0

Views: 1322

Answers (2)

Tim Jarvis
Tim Jarvis

Reputation: 18815

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.

Upvotes: 2

RonK
RonK

Reputation: 9652

Not familiar with BDE - but if it supports standard SQL the order by FIELD_NAME should work fine.

Upvotes: 0

Related Questions