Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FPUTS query
Message
De
27/11/2012 03:14:01
 
 
À
26/11/2012 12:34:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01558047
Message ID:
01558141
Vues:
52
>Try TRANSFORM(lnhandle) && I sometimes have success when similar problems occur in my strange code.

If you want to be sure that fputs() returns zero, that's the way to go


>>Hi
>>Could someone point out what is probably blindingly obvious - I can not get the following code to write to local text file?
>>jn returns 0 each time through the loop.
>>
>>(I am creating and closing the file before opening it again because in my application the file creation is done in a separte method to the writing of text to the file.)
>>
>>
>>
>>USE USERS IN 0
>>lcfname = "C:\temp\testfile.txt"
>>lnhandle = FCREATE(lcfname)
>>FCLOSE(lnHandle)
>>lnHandle=FOPEN(lcFname,12)
>>SELECT USERS
>>SCAN 
>>   jctext = USER+","+NAME
>>  * Write the record
>>  jn=fputs(lnhandle,jctext)
>>ENDSCAN
>>
>>=fclose(lnhandle)
>>
>>
>>
>>
>>Thanks
>>Barry Sutton
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform