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:
01295708
Views:
13
Add Wisconsin to the list. I recall pushing my brother out a window when we were young so he could shovel out the front door! It seemed liked every year we spent an hour shoveling snow for my parents before the school bus arrived. I vowed to never live anywhere there is that much snow without a snowplow, a snowblower, or 10 kids to do the shoveling :o) The summers were worse. Hot, sticky, and swarms of mosquitos everywhere. We actually ran behind the mosquito trucks (until our parents caught us) right in the midst of the blue toxic smoke because that was the only place there weren't any mosquitos! Can't even imagine what that did to my system...



>Right! It's so sad to see all those poor motorists in their compacts being hoisted in the air by mammoth bugs and taken off to god knows where. The look on their faces is enough to keep me up some nights. Another thing, if I didn't have the hummer I would actually have to go out and shovel my driveway... snow 4 feet deep and running the length of the drive is not easy to shovel, especially when it is falling faster than you're shoveling. I prefer to just drive through it. So, while I am in danger of having Rick stop by with a bumper sticker, I think I'll stay with the hummer for now.
>
>>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
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform