Article ID: 115418 - View products that this article applies to.
This article was previously published under Q115418
When you are importing data from other applications into FoxPro, a delimited ASCII file is often used. However, if any of the data columns from the original database extend beyond 255 characters, any text beyond this point will be cut off. Text longer than 255 characters should be stored in a FoxPro memo field. However, the APPEND FROM command does not move data into memo fields.
To work around this behavior, you can use the low-level file I/O functions in FoxPro to programmatically move the data from the text file into the database including the memo field. A sample program for doing this is provided below.
The program below is provided as an example of a FoxPro program that employs low-level file I/O to append data from a delimited text file into character and memo fields. For purposes of this article, the input text file contains three character fields. The third field is to be placed in a memo field and might contain embedded carriage returns.
A sample delimited text file might be constructed as follows:
The following program will add this data to the database:
For information about using low-level file commands to export data to a delimited ASCII file, please see the following article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/95722/EN-US/ )How to Export Memo Fields to an ASCII File
Article ID: 115418 - Last Review: March 3, 2005 - Revision: 2.2