Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Possible Win 2000 issue
Message
 
 
To
03/02/2002 20:12:24
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00614593
Message ID:
00614733
Views:
19
The zero return value means that either empty string was written to file or STRTOFILE() failed for some reason. The first one isn't the case because there wasn't empty file created. The second is hard do diagnose because STRTOFILE() doesn't provide any feedback of why it failed.
What is pazzling that file is created for a first time. To isolate the problem try following:
- Exclude posibility that long property reference somehow affects STRTOFILE().
lcItems = THISFORM.OrderPageFrame.Page2.ItemNumbers.Value
STRTOFILE(lcItems, 'items.txt')
- Check in what directory your program actualy tries to write this file or specify full path for the second parameter.

>Good questions. I checked the return value. Zero. The return value on the Win98 PC was greater than zero and, per my calculation, was correct. Before that I searched the entire PC for the file. None found. I checked the value of the edit box by popping in a button that popped up the value. The value was just as seen on screen.
>
>>Hi Greg,
>>
>>What is return value from STRTOFILE() when file isn't created?
>>Maybe current directory somehow changed and file was created but not in the directory you expected?
>>
>>>I use the following statement in a form. ItemNumbers is an edit box. It has been serving its purpose quite neatly until now.
>>>
>>>=STRTOFILE(THISFORM.OrderPageFrame.Page2.ItemNumbers.Value,'items.txt')
>>>
>>>I spent the last hour observing it fail. I have isolated the issue to this specific statement as I can view from Windows Explorer the items.txt file. Interestingly, this statement only works once for this form. When it is executed again, the items.txt file is not created.
>>>
>>>I have been banging my head trying to figure this out. Finally, I ran the exact same app on a different machine. It worked!
>>>
>>>The app that choked on this was running on a Win2000 machine. The app that ran this fine is on a Win98 machine.
>>>
>>>Any suggestions?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform