Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Import from non-delimited file
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00009313
Message ID:
00009449
Vues:
29
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform