Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't save string as file
Message
 
To
12/04/2012 16:32:01
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01541276
Message ID:
01541340
Views:
55
>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")
Previous
Reply
Map
View

Click here to load this message in the networking platform