Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DBF to Text file
Message
 
À
31/12/2004 02:27:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Divers
Thread ID:
00973493
Message ID:
00973532
Vues:
15
>Dear Sir,
>
>I have a table entitled "errors" contained following fields
>
>Date, time,errno,message,lineno
>
>I want to show only last record in text file, c:\error.txt,
>but the data of every field must show in new line for example
>
>31/12/2004
>10:00:00
>1200
>field not found
>3
>
>What should I do?
>Please help
>
>Thanks in advance
#define CRLF CHR(13)+CHR(10)
SELECT Errors
GO BOTTOM
c_str = ""
FOR nFlds = 1 TO FCOUNT()
    c_str = c_str + ALLTRIM(TRANSFORM(EVAL(FIELDS(nFlds)))) + CRLF
NEXT
STRTOFILE(LEFT(c_str, LEN(c_str)-1),"Errors.TXT")
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform