Delphi Cookbook
上QQ阅读APP看书,第一时间看更新

Getting ready

In this recipe, we will see how to import the old information distributed under heterogeneous sources, CSV and table, into our new data system. We will also be able to export the new data in CSV format.

As already mentioned, TFDBatchMove implements the engine to process the data movement between different types of data sources and destinations. This operation is made possible through reader and writer components. FireDAC provides three types of standard reader and writer:

 
        
Component           Use
TFDBatchMoveTextReader           Reader for text file
TFDBatchMoveTextWriter           Writer for text file
TFDBatchMoveDataSetReader           Reader for TDataSet
TFDBatchMoveDataSetWriter           Writer for TDataSet
TFDBatchMoveSQLReader           Reader for SQL
TFDBatchMoveSQLWriter           Writer for SQL
Ensure that you have followed the instructions in the The Amazing FDTable recipe on database preparation. If you don't, then go to it and set up your environment.