VFP8 SP1
I have an error handling routine I would like to popup a box that the user
can type into to say what they were doing at the time of the error. The file
is then emailed to us.

When the MODIFY FILE command finishes I get this message "Session number is
invalid" repeated many times CANCEL IGNORE & HELP buttons are available,
cancel fixes the problem and the email is generated.

cReasonFile = TRANSFORM( INT(rand()*10^8) ) + ".txt"
STRTOFILE(CRLF + CRLF + CRLF + "[Please include a brief description of
how the error occurred]", cReasonFile)
MODIFY FILE (cReasonFile)
*** Seems to occur here after the Modify completes but before the
fileToStr() executes.
cReason = FILETOSTR(cReasonFile)
ERASE (cReasonFile)

If I use the debugger to step through the code the problem doesn't occur.
The only way I have been able to determine where the error occurs is through
"wait window ..."

Any ideas - I am stumped, it could be the error being reported is wrong.

Re: strange behaviour - MODIFY FILE by Josh

Josh
Wed Aug 16 11:16:01 CDT 2006

I wouldn't use the modi file -- instead use a form to pop up & then email the
problem....



On Wed, 16 Aug 2006 21:07:11 +1000, "Paul Hemans"
<pauln.o.s.p.a.m@laberg.com.au> wrote:

>VFP8 SP1
>I have an error handling routine I would like to popup a box that the user
>can type into to say what they were doing at the time of the error. The file
>is then emailed to us.
>
>When the MODIFY FILE command finishes I get this message "Session number is
>invalid" repeated many times CANCEL IGNORE & HELP buttons are available,
>cancel fixes the problem and the email is generated.
>
> cReasonFile = TRANSFORM( INT(rand()*10^8) ) + ".txt"
> STRTOFILE(CRLF + CRLF + CRLF + "[Please include a brief description of
>how the error occurred]", cReasonFile)
> MODIFY FILE (cReasonFile)
>*** Seems to occur here after the Modify completes but before the
>fileToStr() executes.
> cReason = FILETOSTR(cReasonFile)
> ERASE (cReasonFile)
>
>If I use the debugger to step through the code the problem doesn't occur.
>The only way I have been able to determine where the error occurs is through
>"wait window ..."
>
>Any ideas - I am stumped, it could be the error being reported is wrong.
>


--- AntiSpam/harvest ---
Remove X's to send email to me.