AvisMap - Mapping Software Provider

Affordable GIS / Mapping Software Products and Solutions.

Match Table of Field Copy

The method CopyField of soRecordset can copy one field to another; even the different types of fields, the corresponding match rule are listed below:

Boolean Byte Integer Long Currency Single Double Date Text Memo
Boolean Y Y1 Y1 Y1 N Y1 Y1 N Y2 Y2
Byte Y3 Y Y Y Y Y Y N Y Y
Integer Y3 Y4 Y Y Y Y Y N Y Y
Long Y3 Y4 Y4 Y Y Y Y N Y Y
Currency N Y4 Y4 Y4 Y Y Y N Y Y
Single Y3 Y4 Y4 Y4 Y Y Y N Y Y
Double Y3 Y4 Y4 Y4 Y4 Y4 Y N Y N
Date N N N N N N Y Y Y Y
Text N Y5 Y5 Y5 Y5 Y5 Y5 N Y Y
Memo N Y5 Y5 Y5 Y5 Y5 Y5 N Y Y

How to read the table?

Each Y or N means field can be copied or not from the corresponded row to column, and Y means yes and N means no. The particular Y or N with superscript has restrictions shown as below which should be noticed in practical operations.


1- Boolean to Numeric, True becomes to 1 and False becomes to 0;
2- Boolean to String, True becomes to “true” and False becomes to “false”, but in some special databases, true will become to “1″ and false become to “0″
3- Numeric to Boolean, non-zero value becomes to True and zero becomes to False;
4- Possibaly occurring data truncated.
5- If there are non-numeric characters involved in text, for example, “aaa”, it would fail to match the specified type.

Descriptions:

  • The match table of field copy may have difference in details due to the different engines, for example, the Memo field is only supported by SDB or SDBPlus engine, not in SQL and others.
  • In essential, field copy is implemented via the standard SQL sentences of database: Update TableName Set DestFieldName = SourceFieldName. If you have any questions about the function, please refer to the usage in particular database.