Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parsing a file that's not quite comma-delimited
Message
From
11/07/2007 11:58:06
 
 
To
11/07/2007 11:49:41
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01238841
Message ID:
01239347
Views:
15
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
Previous
Reply
Map
View

Click here to load this message in the networking platform