Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Import Text file
Message
From
07/07/1999 10:52:06
 
 
To
07/07/1999 04:55:04
Narong Tohku
Knownet Co.,Ltd.
Bangkok, Thailand
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00238156
Message ID:
00238291
Views:
10
>Hi..All
>I want import text file (data.txt) into table in my application ..(not use import wizard..How I can do? I want have import menu from my application and input file name (data.txt)
>

There are literally dozens of ways to do this, the best will vary according to the VFP version you're using and how the text file is laid out. You could build an import table format as a template, and import it using APPEND FROM with appropriate type based on the way the text file is constructed (ie comma-delimited files use the DELIMITED clause, if all lines and fields are fixed length, TYPE SDF is appropriate, etc.) You can such the file into a memo frield and then use the built-in functions for walking through a memo field (MLINE() MEMLINES(), and all the string functions), pull it into a string using the VFP6 FILETOSTR(), or use the low-level file I/O functions to read the file. Without knowing a good deal more, it's iompossible to say which method is best - I've used all of them in different situations, and the form of the input data really determines how best to process the file.

>Narong
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform