Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating ascii file
Message
De
25/10/2002 07:08:28
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00715247
Message ID:
00715338
Vues:
14
Thanks Sergey - I toyed with the dos copy command copy file1+file2 but I really wanted to stay away from the dos commands. I had forgotten about filetostr.

Gaylen

>You can use FILETOSTR()/STRTOFILE() combination to add files to the end of the result file.
SELECT table1
>COPY SDF TO (lcAsciiFile)
>SELECT table2
>COPY SDF TO (lcTempFile)
>STRTOFILE(FILETOSTR(lcTempFile), lcAsciiFile, .T.)
>SELECT table3
>COPY SDF TO (lcTempFile)
>STRTOFILE(FILETOSTR(lcTempFile), lcAsciiFile, .T.)
>ERASE (lcTempFile)
>
>
>>I have three table from which i need to make an ascii file. All the records in the first table followed by all the records in the second table etc. All the table have different structures. I assumed I could use the copy to command with a type of sdf. However using the copy to on the second table overwrites the txt file from the first copy to. I did not see an additive command or anything like that.
>>
>>Any other ideas are welcome.
>>
>>Thank
>>Gaylen
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform