Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Writing to Text file
Message
 
À
13/12/2013 13:19:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
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:
01590155
Message ID:
01590174
Vues:
55
This is a warning regarding using strtofile() in a loop that contains a lot of rows.

The problem will be if you have a virus scanner because it will check the file each and every strtofile() gets called. Again, if there are a lot of rows this will be a performance problem.

If performance is a problem then you need to use low level file IO with fopen or concatenate the string in the loop and then output it just once with strtofile().


>I don't think Text-Endtext is well suited in this case. Have you tried strtofile()? Something like this should work.
>
>Create Cursor BILLCOMPRESS (PS C(254))
>Append From (m.CPSFILEPATH) Sdf
>scan
>   strtofile(trim.newpath,trim(ps),1)
>Endscan
>
>
>>I am changng some text inside Text file (in Pact Post Script files).
>>
>>When I opened the original PS file in classic Notepad in Windows, all the text looks like garbage and difficult to trace the locations. However I inserted my required text and re-write the entire file back using the following command.
>>
>>
>>Create Cursor BILLCOMPRESS (PS C(254))
>>Append From (m.CPSFILEPATH) Sdf
>>Set Textmerge On
>>Set Textmerge To (m.NEWPATH) Noshow
>>Scan
>>\\<< TRIM(PS) >>
>>\
>>Endscan
>>Set Textmerge To
>>Set Textmerge Off
>>
>>
>>Now, the text has been written back and file is working properly, but the Text Inside that is displayed in separate Line by Line.
>>I need to keep my Text in Original (GARBAGE STYLE) so that it may be quite difficult for someone to read easly.
>>
>>Please open this FIle to see how text is displayed in Garbage style.Kindly Guide How to do this any delimiter. Here is my file, please open in Classic Notepad to see.
>>
>>https://www.dropbox.com/s/y210d15ourro5c5/1021165998.ps
>>
>>Regards
>>
>>
>>
>>
>>
>>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform