FireDAC.Comp.BatchMove.SQL.TFDBatchMoveSQLWriter
Delphi
TFDBatchMoveSQLWriter = class(TFDBatchMoveSQLDriver, IFDBatchMoveWriter)
C++
class PASCALIMPLEMENTATION TFDBatchMoveSQLWriter : public TFDBatchMoveSQLDriver
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
class | public | FireDAC.Comp.BatchMove.SQL.pas FireDAC.Comp.BatchMove.SQL.hpp |
FireDAC.Comp.BatchMove.SQL | FireDAC.Comp.BatchMove.SQL |
Description
TFDBatchMoveSQLWriter is used to directly connect to a DBMS using a TFDConnection component.
Use TFDBatchMoveSQLWriter to connect to the DBMS where you want to copy the data using TFDBatchMove.
The main difference between TFDBatchMoveSQLWriter and TFDBatchMoveDataSetWriter is that the TFDBatchMoveSQLWriter uses the FireDAC ArrayDML feature and provides maximum possible speed of data writing.
Set a destination table name using the TableName property. Instead of using the the TableName property, set an SQL query providing the destination data structure using the ReadSQL property, and set the SQL writing query using the WriteSQL property. Optionally set GeneratorName to provide a database generator / sequence name to populate auto-incrementing fields.
Choose TFDBatchMoveSQLWriter as the Writer property of the TFDBatchMove.
TFDBatchMoveSQLWriter supports all the possible TFDBatchMove data movement modes.
In the modes dmAppend, dmUpdate, dmAppendUpdate, and dmDelete the destination table must have primary key.
See Also
- FireDAC.TFDBatchMove Sample
- FireDAC.Comp.BatchMove.TFDBatchMove
- FireDAC.Comp.BatchMove.Text.TFDBatchMoveTextReader
- FireDAC.Comp.BatchMove.Text.TFDBatchMoveTextWriter
- FireDAC.Comp.BatchMove.DataSet.TFDBatchMoveDataSetReader
- FireDAC.Comp.BatchMove.DataSet.TFDBatchMoveDataSetWriter
- FireDAC.Comp.BatchMove.SQL.TFDBatchMoveSQLReader