ORDER BY DESC

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jasmad
Posts: 9
Joined: Wed 04 Jan 2012 21:33

ORDER BY DESC

Post by jasmad » Wed 02 May 2012 22:15

Hi,
I want to sort a ibctable by id descending
there is any way to do that with this component?

Regards.

ZEuS
Devart Team
Posts: 240
Joined: Thu 05 Apr 2012 07:32

Re: ORDER BY DESC

Post by ZEuS » Thu 03 May 2012 09:53

Hello.

To sort a table by id descending you can use either local sorting or server-side sorting.
To perform local sorting you should set

Code: Select all

IBCTable.IndexFieldNames := 'ID DESC'
You can find more detailed information about local sorting in the "TMemDataSet.IndexFieldNames Property" article of the IBDAC documentation.

To perform server-side sorting you should set

Code: Select all

IBCTable.OrderFields := 'ID DESC'

Post Reply