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.
TClientDataSet
DataSet
order by
id
What am I doing wrong?
Your problem is the TDataSetProvider , not the TClientDataSet .
TDataSetProvider
Try setting the flag poRetainServerOrder to True in the TDataSetProvider.Options property:
poRetainServerOrder
True
TDataSetProvider.Options
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.
Source: https://habr.com/ru/post/1276172/More articles:What does "@" mean before importing into React? - javascriptCreating GCM / CBC ciphers in streams in a golang - goCF accepts JSON string in cf2016 but not in cf9 - jsonHow to return the open Quickly return to the dark theme on Xcode 9.3? - xcodeHow to define a rectangle in a rectangle? - performanceWhy does an unreachable try-catch block increase execution time? - c ++Overload uncertainty using std :: function, which takes the std :: optional parameter - c ++Want to save XML in a SQL Server 2014 table and apply the selection on the same - xmlError: "Configuration" compilation "is deprecated and replaced by" implementation "." Although "compilation" is present in gradle - androidSystem.IO.FileNotFoundException: Failed to load file or assembly ... (.resources) - c #All Articles