Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help With Importing Text File
Message
From
18/06/2003 09:25:20
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
18/06/2003 08:30:35
Julie Ball
Gardner Publications, Inc.
Cincinnati, Ohio, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00801114
Message ID:
00801131
Views:
12
>I have a text file that contains compy info records that I need to import into FoxPro. Easy enough. Well the problem is, is that this file has the records input a little different. Instead of having a company, address, phone, fax info as different fields; it displays each field as a different record. How it is displayed is:
>ABC Company
>123 West St
>Some City, OH 55555-5555
>Phone: 555-555-5555 Fax: 555-555-5555
>
>There is a blank after each company record. How do I go about importing these files into a dbf but have each company record display in it's correct fields?
>
>Thank you,
>Julie

I would read one line at a time, for instance with LLFF (the fgets() function), and write a loop to append records and insert them into the correct place.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform