Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
More control in a .txt
Message
De
26/11/2010 07:10:05
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01490543
Message ID:
01490549
Vues:
48
This message has been marked as the solution to the initial question of the thread.
>I need to write to a .txt but I can not just use "copy to type", because I need more control over the txt file.
>
>
> I have two tables: maintable.dbf and item.dbf and I need something as below:
>
>
>open my.txt file
>
> use table 1
>
> scan
>
> write: field1 + "|" + field2 + "|" + field3
>
> in the next line
>
> write: field4 + "|" + field5 + "|" + field6
>
>use item
> scan for condition
>
>write: field1 + "|" + field2
>
> in the next line
>
> write: field3 + "|" + field4
>
>endscan
> endscan
>

Hi Moises,

TEXTMERGE makes this pretty easy:
SELECT Table1
SET TEXTMERGE ON NOSHOW
SET TEXTMERGE TO MyFile.txt
SCAN
   \<<field1>>|<<field2>>|<<field3>>
ENDSCAN
SET TEXTMERGE OFF
SET TEXTMERGE TO
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform