Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Writing 2 records from a dbf to a single string text fil
Message
De
07/10/2014 14:01:22
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01608915
Message ID:
01608936
Vues:
71
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform