SQLMemTable: BDE Alternative Embedded
In-Memory Database with SQL for Delphi / C++Builder


TSQLMemBatchMove.Mappings
TSQLMemBatchMove

Top 

Specifies the column mappings for a batch operation.

Delphi syntax:

property Mappings: TStrings;

C++ syntax:

__property Classes::TStrings* Mappings = {read=FMappings, write=SetMappings};

Description

Set Mappings to specify the correspondence between fields in the Source and fields in the Destination. By default TSQLMemBatchMove matches fields based on their position in the source and destination tables. That is, the first column in the source is matched with the first column in the destination, and so on. Mappings enables an application to override this default.

Mappings is a list of column mappings (one per line) in one of two forms. To map the column ColName in the source table to the column of the same name in the destination table, use:

ColName


To map the column named SourceColName in the source table to the column named DestColName in the destination table, use:

DestColName=SourceColName


When adding or appending records, fields in Destination which have no entry in Mappings will be set to NULL. When copying a dataset, fields in Destination which have no entry in Mappings will not appear as columns in the copy of the table.

If source and destination column data types are not the same, TSQLMemBatchMove can either cancel the batch operation or perform a "best fit". If AbortOnProblem is true, type mismatches will terminate the batch move. Otherwise, the field values from the Source will be converted, if possible, to be compatible with the Destination.


© AidAim Software SQLMemTable: