Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Writing 2 records from a dbf to a single string text fil
Message
From
07/10/2014 14:01:22
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01608915
Message ID:
01608936
Views:
70
>My file contains
>
>A records max length 254 characters write as a single line on the text file
>
>B records 2 lines of max 254 characters which I want to write as a single line of text
>
>The text file is to be comma delimited with " around the text
>
>Any ideas? has it got anything to do with carriage return / line feed characters?

Start by experimenting with the various versions of COPY TO, like TYPE DELIMITED and TYPE SDF, to see how close that gets you. Once you use that to get the data items formatted as desired, probably use FileToStr() to read it back in, ALINES() to break it up and then a loop to combine the two lines you want into one. Finally, StrToFile() to write it back out.

If I've totally misunderstood your needs, show us a few sample records and the desired result.

Tamar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform