Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
File problem (#2)
Message
 
 
À
04/07/2003 09:36:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00806939
Message ID:
00806975
Vues:
13
You've to move pointer to the end of the file before writing into it.
=FSEEK(gnErrFile, 0,2)
=FPUTS(gnErrFile, lfield )
BTW, you can use < PRE > and < /PRE > tags (w/o space to preserve your code formatting and make it readable.

>NOw i found the solution i use FPUTS and it make my carriage return but when i write in the file it erase me character. How can i do if i dont want to lose character?
>SELECT rapport
>		COPY TO "export.csv" TYPE DELIMITED WITH "" WITH CHARACTER "|"
>		IF FILE('export.csv')  && Does file exist?
>		   gnErrFile = FOPEN('export.csv',12)  && If so, open read-write
>		ENDIF
>		lfield = ""
>		FOR gnCount = 1 TO (FCOUNT( ) - 1)  && Loop for number of fields
>  			 lfield = lfield + FIELD(gnCount) + "|"
>		NEXT
>		lfield = lfield + FIELD(gnCount)
>		=FPUTS(gnErrFile, lfield )
>		=FCLOSE(gnErrFile) 	
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform