RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TBatchMove.Mappings Property

Specifies the column mappings for a batch operation.

Pascal
property Mappings: TStrings;
C++
__property TStrings Mappings;

Set Mappings to specify the correspondence between fields in the Source and fields in the Destination. By default TBatchMove 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, TBatchMove 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

 

AbortOnProblem 

Destination 

Mode 

Source 

Creating a Batch Move Component 

Mapping Data Types

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!