I have a problem with TClientDataSet
. On the DataSet
, the order by
clause of my SQL works fine, but when I use a TClientDataSet
, the records appear in order of the database's id
field.
What am I doing wrong?
Your problem is in the TDataSetProvider
, not in the TClientDataSet
itself.
Try setting the poRetainServerOrder
flag to True
in the TDataSetProvider.Options
property:
Signals that the client should not attempt to re-establish the default order by sorting the records in the data packet. This prevents the client from changing the record order because, for example, it is unable to duplicate the locale on the server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With