TurboDB VCL Component Library

TTdbBatchMove.Mappings

TTdbBatchMove

Previous  Top  Next

Contains a list of column assignments for the import.

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 TTdbBatchMove 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.

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

DestColName=SourceColName

You may also use the column no proceeded by a $ for the mapping:

$8=$3

You can mix the column identifiers in a mapping as well:

$8=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.