I converted a 2.8 MB XML file into a ClientDataSet in Delphi XE. The XML file changes quite frequently and I am basically building a new CDS file programmatically every time the XML changes. It's not only the content the changes, but also the actual structure.
The question is: Is it possible to use simple SQL on ClientDataSet1 to create a second ClientDataSet with a result table in memory? If the answer is yes, what are the basic mechanics? Currently I am only using TClientDataSet and TDataSource to make the database available to data-aware components.
No, you can't run a SQL sentence over a TClientDataSet
when is used as a memory dataset, because doesn't have associated a SQL provider. You best option is use the filtering capabilities included in the TClientDataSet. For that you can use Ranges
or Filters
and then clone the result in a secondary TClientDataSet. for more details about filtering try this article Filtering ClientDataSets
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