Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strtofile inconsistent
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01295630
Message ID:
01295685
Views:
13
PS: Having spent most of my life in Minnesota and your comment about the Hummer, I don't think people that are not familiar with Minnesota and the Dakota's realize you need a big vehicle to navigate with all those mosiquito's and bugs out there in the summer and fall.


>Well, I don't know on XP SP2, but on Vista Ultimate/VFP 9.0 SP2 running an exe with elevated permissions I get exactly what I expect and the csv and txt are the same. I would sincerely doubt that a bug exists in VFP's StrToFile() when using a file name with "Pay.csv" in it. But, I can't explain what you are seeing either.
>
>>if the following is run in my development the results are what I expect, however, when run in the EXE the results are not what I expect.
>>
>>
>>lcFolder = 'C:\'   &&& pathing
>>
>>lcfileName = lcFolder+'somenamewith_pay.csv'
>>
>>lcString = '"This is column1","This is column2"'+Chr(13)+Chr(10)
>>
>>FOR ix = 1 TO 10
>>	lnNumberBytes = Strtofile(lcString,lcfilename, 1)
>>endfor
>>		
>>lcfileName = lcFolder+'somenamewith_pay.txt'
>>
>>FOR ix = 1 TO 10
>>	lnNumberBytes = Strtofile(lcString,lcfilename, 1)
>>endfor
>>		
>>
>>
>>
>>running with XP sp2 and vfp9.0 sp2
>>
>>Can somebody verify this as a problem, or am I missing something?
>>
>>Thanks in advance
>>
>>
>>>My guess is that you have a file with the same name included in your project, in which case it is included in your exe and seen as read only. Another possibility is that you must include the path.
>>>
>>>>I have been beating my head against the wall trying to solve this but no luck so far.
>>>>
>>>>Basically I am collecting information that I need to append to a file with the following
>>>>
>>>>
lnNumberBytes = Strtofile(clString,lcFilename, .t.)
>>>>
>>>>This works fine when in development, however, when I am running the exe, the number of bytes returned is 0. The first time the lcFileName is created, it save, but when appending it will not.
>>>>
>>>>I tried passing a 1 but still the same results.
>>>>
>>>>
lnNumberBytes = Strtofile(clString,lcFilename, 1)
>>>>
>>>>
>>>>Any suggestions would be greatly appreciated.
>>>>
>>>>Thanks in advance
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform