> Hi
>
> Please this is urgent. :-P
>
> We run a VFP 9 SP1 exe in Win2003 Terminal Services and of late we have been getting this error in our app that my error routines are unable to trap:
>
>
Invalid Seek Offset>
> I have a Form Level Error trap which is supposed to close the form down. If this does not I also have an On Error routine that logs the error and closes the form.
>
> I also have an OnShutdown routine. The error code in the form and/or OnError is supposed to reset this to allow the user to quit and this works perfectly in 99% of cases.
>
> However with this error both Error traps are bypassed and the VFP error dialog appears so I cannot turn off the OnShutdown and quit and the app just locks up.
>
> I know there is a connectivity issue on our network and our network guys are working on this.
>
> But from our side I want to be able to trap this error somehow so that the app can exit gracefully, since there is no point continuing with nil connectivity. So I need a way to trap this error and turn off my OnShutdown so the user can quit.
>
> I have searched on Google as well as here on Foxite but no solution.
>
> This is not dur to Index errors since we use SQLServer. It is a connectivity issue.
>
> Any ideas are appreciated.
>
>
> Another thing I tried, is to wrap my Form.Error code in a Try..Catch..EndTry block but the Catch never fires in the Error Event of the form.
>
> For example:
>
>
Form::Error>
>
LPARAMETERS nError, cMethod, nLine
> TRY
> WAIT WINDOW yipes
> CATCH
> WAIT WINDOW "CatchError is running"
> QUIT
> ENDTRY
>
> The form always stops on the Wait Window line with the error "Variable 'Yipes' not found. The error never triggers the CATCH.
>
> But if I move this code to MyError.PRG and execute
>
>
ON ERROR DO MyError.prg
>
> the TRY..CATCH..ENDTRY works as it should and VFP Quits.
>
> What is happening here?
>
>
> Bernard
>
>
** If you see someone without a smile, give em one of yours :) **>
My Blog 8-)
Hi Bernard,
Yes, it is a connection-triggered error. My hunch is, when VFP sends a request of OS service (in this case, a remote file connection), that's where the error occurs before the OS can send a reply back to VFP. Have you tried BINDEVENT() to trap this error?