CopyReaderToClientDataSet after XE2 – Where are you?

CopyReaderToClientDataSet copies the contents of a TDBXReader into a TClientDataSet instance. It returns the same TClientDataSet instance that was passed to this method.

CopyReaderToClientDataSet is part of the Data.DBXDBReaders.TDBXDataSetReader class until Delphi/C++Builder XE2, however in XE3 it changed a little bit, it became part of a new class called Data.DBXCDSReaders.TDBXClientDataSetReader.

I got several e-mails from my blog readers that downloaded some of my examples, when compiling with latest versions they got a error message saying the CopyReaderToClientDataSet method can’t be found.

The solution is simple, add Data.DBXCDSReaders.pas as part of the uses clause and replace all the TDBXDataSetReader by TDBXClientDataSetReader, which is the new home for CopyReaderToClientDataSet.

Enjoy!!!

One Response to CopyReaderToClientDataSet after XE2 – Where are you?

Leave a Reply

Your email address will not be published. Required fields are marked *