Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't save string as file
Message
 
À
12/04/2012 16:32:01
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01541276
Message ID:
01541340
Vues:
56
>I am using a database to to create the text and then I use filetostr() to get the contents. The problem is the tool is leaving CRLFs and the batch file fails unless I strip them out.
>

Try code like this;
TEXT TO lcOut
dbsvc -t Network -s Automatic -as -i -sn "SQL Anywhere - wamtest" -y -w "wamtest" 
"C:\Program Files\SQL Anywhere 11\Bin64\dbsrv11.exe" -x tcpip{port=2938}  -n 
wamtest d:\projects\neiman\wm\data\wam11_dev.db -n wam11_dev  
d:\projects\neiman\wm\data\consolidated\consolidated.db -n consolidated  
D:\Projects\realweb\data\realweb11.db
ENDTEXT

* Remove CRLF's
lcOut = STRTRAN(lcOut,CHR(10),"")
lcOut = STRTRAN(lcOut,CHR(13),"")

?STRTOFILE(lcOut,"test.bat")
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform