Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parsing a file that's not quite comma-delimited
Message
De
11/07/2007 11:58:06
 
 
À
11/07/2007 11:49:41
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01238841
Message ID:
01239347
Vues:
12
This message has been marked as a message which has helped to the initial question of the thread.
>>If you create specialized LineToObject methods that match with field namings of target tables then you'd directly do an insert into in those methods. The one I wrote is a generic parser.
>
>Sweet! What is the best way to insert into a cursor from an object?

Are the fields in your cursor going to be named field001, field002, etc., like in the object?

You are going to have to do some data mapping. It can be hard coded in your program, or you can set up some sort of data dictionary that maps segment positions (For example, PID segment, field 3), to tables and fieldnames.

Using data dictionary to do the mapping is ultimately more flexible, but takes more work to set up in the beginning.
Steve Gibson
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform