Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strtofile inconsistent
Message
From
25/02/2008 10:33:22
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01295630
Message ID:
01296087
Views:
12
OK, so VFP tells exactly what you notice, namely that the string is not appended. What about skipping the 1 parameter, and doing it the "old" way=
?strtofile(filetostr(lcFilename) + lcNewtext, lcFilename)
>I put a messagebox to report and the length of the string is some value, but the return value for strtofile was 0
>
>
>
>>What's the return values for strtofile()?
>>
>>>the path is contained in the "lcfilename", The first time this code is hit and a file does not exist, it is created. When it is hit again to add to the file, it fails. (Only in the EXE). If I run in development, there are no problems. The file is created in a location where permissions are granted.
>>>
>>>
>>>>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
Reply
Map
View

Click here to load this message in the networking platform