The information in this article applies to:
SUMMARYIf some basic rules are followed, FoxPro can convert fields to different types within a database without data loss.
MORE INFORMATIONThe usual method for converting a field type in a database involves using the MODIFY STRUCTURE command. Below is a table that summarizes the types of field data that are possible and also indicates if data may be lost in the translation. "Yes" indicates that the data will be preserved, "No" indicates that data will be lost, and "Possibly" depends on the data involved. Data Type Char Numeric Float Date Logical Memo --------------------------------------------------------------- Char Possibly Possibly Possibly Possibly No Numeric Yes Yes No No No Float Yes Yes No No No Date Yes No No No No Logical Yes No No No No Memo No No No No No Note: Depending on the string to be converted, a character field can be converted into any other field, except a memo field.
Character fields can also be converted to logical fields if the first letter of the field is one of the following and is in uppercase:
A numeric or float field can be converted to a character field as long as the field is large enough to hold the converted data. If the field is not large enough, data loss will occur. Keywords : Version : Platform : Issue type : |
Last Reviewed: August 19, 1999 |