Appending from a Delimited ASCII File Using Low-Level I/OID: Q115418 2.50b 2.50c | 2.50 2.50a 2.50b 2.60 | 2.50 2.50a 2.50b 2.60 3.00
The information in this article applies to:
SUMMARYWhen 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.
MORE INFORMATIONThe 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:
Additional reference words: VFoxWin 3.00 FoxMac FoxDos FoxWin 2.50 2.50a
2.50b 2.60
2.50c
import
KBCategory:
KBSubcategory: FxprgGeneral
|
Last Reviewed: December 23, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |