ClientDataSet order not working

I have a problem with TClientDataSet . In a DataSet , the order by clause of my SQL works fine, but when I use TClientDataSet , the records are displayed in the order of the id database field.

What am I doing wrong?

+5
source share
1 answer

Your problem is the TDataSetProvider , not the TClientDataSet .

Try setting the flag poRetainServerOrder to True in the TDataSetProvider.Options property:

Informs that the client should not try to restore the default order by sorting the records in the data packet. This does not allow the client to change the recording order , because, for example, he cannot duplicate the locale on the server.

+9
source

Source: https://habr.com/ru/post/1276172/


All Articles