Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Writing to Text file
Message
De
14/12/2013 08:34:31
 
 
À
14/12/2013 08:24:18
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:
01590231
Vues:
58
>>That's not unexpected since VFP opens the file for every record, it was more to check the concept. Try this instead:
>>
>>Create Cursor BILLCOMPRESS (PS C(254))
>>Append From (m.CPSFILEPATH) Sdf
>>lcText=''
>>scan
>>   lcText = lcText + trim(ps)
>>Endscan
>>Strtofile(lcText,newpath)
>
>Yuck - if Len(lcText) grows much beyond 2**16 you will hamper vfp heavily by forcing to allocate new memory. Turn to LLF instead, more stable overall.

No problem, I actually agree with you. The thing is that it's been a long time since I used the low level file functions, so I just wrote down a few lines from memory. This should be the fastest and overall best solution, I hope you agree.
lnHandle = fcreate(newpath)
scan
   fwrite(lnHandle,trim(ps))
Endscan
fclose(lnHandle)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform