Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Import from non-delimited file
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00009313
Message ID:
00009449
Views:
30
The easiest (and fastest)way that I've found is using

APPEND FROM ... TYPE SDF

As long as your text file is in SDF (fixed column) format, it's
really easy. To really make things fast, do a CREATE CURSOR and
append into the cursor. Here's how it looks:

CREATE CURSOR yomomma ;
(column1 C 20, ;
filler1 C 1, ;
column2 C 10, ;
filler2 C 1...etc.

then do your append from.

Normally I'll create any needed index tags between creating the
cursor and appending from the file. This method is MUCH faster
than creating a static DBF and appending and MUCH MUCH faster
than FGETS.

Michael
Previous
Reply
Map
View

Click here to load this message in the networking platform