Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help on FileToStr() and ChrTran() functions
Message
De
10/05/2001 07:45:25
 
 
À
10/05/2001 05:35:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00505649
Message ID:
00505667
Vues:
22
>Hi
>
>I'm using these commands to get rid of the double quotes in a text flat file. The code works accept when the file contains more than +/- 2000 records (lines) the vfox session hangs (NOT RESPONDING). Is there a limit or do I need to include in my code a command that tells vfox to wait until the FileToStr command is done? Please help...
>
>The command that causes the programto hang is:
>StrToFile(chrtran(FileToStr('c:\tmp\wtbsold.txt'),'"',''),'c:\tmp\wtbsold.txt')
>
>Thank you
>
>Irene Grassow

I don't know the answer to this but...
It might be worth creating a variable in a intermediary step between the filetostr and the strtofile
I don't quite know where the file would be stored with the technique you have used, somewhere internally to Foxpro - maybe it's just too much for it to handle.
Try something like
lcStr = FileToStr('c:\tmp\wtbsold.txt')
StrToFile(chrtran(lcStr),'"',''),'c:\tmp\wtbsold.txt')
Foxpro's limits for string handling are pretty huge (on my machine 5,865,500 chars then it GPF's) so unless the file you are reading in is enormous this should work!
Will Jones
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform