Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Writing to a text file
Message
From
18/08/1999 11:10:45
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00254904
Message ID:
00255000
Views:
23
I guess one of the strengths of the product is that we can have this discussion, eh? :-)

I just don't like stuff like:

cString="TITLE: "+mytable.title+CHR(13)+"NAME: "+mytable.name+ ... ad infinitum
just for the convenience of using STRTOFILE



>I've not done 9MB but I've done 2 to 3 with no problems.
>
>Sorry John, I'll stick with Ed on this one.
>
>Jeff
>
>>>Jeff ---
>>>
>>>Do you mean STRTOFILE()? The reason I went to low-level IO for this problem is that it appears that he's putting labels and data on sequential lines. This could be one doggone big character string.
>>>
>>
>>No big deal here; I've built a humongous (upwards of 9MB) string in VFP6 and then done a STRTOFILE() on it successfully.
>>
>>>
>>>>I'm not sure why you say "only one good way". Filetostr() should handle this very well, and you don't have to keep up with pointer and Low Level Stuff like that. Maybe I'm missing something? As we say here in the South, Splainit to me. :)
>>>>
>>>>Jeff
>>>>
>>>>>Only one good way to do it: Use FCREATE(), FPUTS(), et al...the low level file commands. Very easy and you have total control over the output.
>>>>>
>>>>>
>>>>>>I have to export data from a FoxPro database using VFP 6.0 in an unusual format to a text file. What commands can I use to send hard code as well as my data to the text file? I am currently trying:
>>>>>>
>>>>>>SET ALTERNATE ON
>>>>>>SET ALTERNATE TO &lcfilename ADDITIVE
>>>>>>??'RUNDATE: '
>>>>>>??'OPERATOR: '
>>>>>>
>>>>>>at the beginning of my routine, and it's not working! Any ideas?
>>>>>>
>>>>>>Thanks!!
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Reply
Map
View

Click here to load this message in the networking platform