Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strtofile returns 135 but nothing gets written
Message
 
 
À
09/02/2016 18:34:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01631161
Message ID:
01631172
Vues:
65
It only worked for me when I ran VFP as Admin.

>Hi Naomi
>i tried this similar test code and it works as well for me.try to verify the strtofile params.
>
>*create a  folder in c:\ProgramData as myDir and export the filetostr content to file log.txt (appending)
>* i dont run vfp9 as administrator.I dont change any attribute of myDir folder.
>
>declare integer Sleep in kernel32 integer
>#define cr chr(13)+chr(10)
>if ! directory("C:\ProgramData\myDir")
>md  "C:\ProgramData\myDir"  &&create folder myDir if dont exist
>endi
>
>for i=1 to 4  &&test 4 sends
>local m.myvar
>text to m.myvar textmerge  noshow
><<ttoc(dateTime())>>
>**********
>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin vel risus eget lorem feugiat
>fermentum nec a turpis. Phasellus purus sem, mollis ac posuere eget, ornare vel orci. Sed ac rutrum
>nulla. Aenean ultrices eget lectus eu efficitur. In hac habitasse platea dictumst. 
>***********
>endtext
>=strtofile(cr+m.myvar+cr,"c:\ProgramData\myDir\log.txt",.t.)  &&sent to log all 2 seconds
>sleep(2000)  
>endfor
>run/n notepad c:\ProgramData\myDir\log.txt
>
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform