Bde.DBTables.TBatchMove.Mappings

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Mappings: TStrings read FMappings write SetMappings;

C++

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

Properties

Type Visibility Source Unit Parent
property published
Bde.DBTables.pas
Bde.DBTables.hpp
Bde.DBTables TBatchMove

Description

Specifies the column mappings for a batch operation.

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.

See Also