Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get VFP OLE Server to use error procedure
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00097111
Message ID:
00097292
Views:
26
>>>>You can't do any screen IO from a VFP Server. You'll need to write the information to the error log.
>>>
>>>Thanks for responding Craig.
>>>
>>>Actually I am using a MessageBox call and I got it to work with very basic information. It still manages to go back to the VFP message. Now I have to figure out how to get the class to release without returning to the method that called the error.
>>
>>
>>Look at RETURN TO MASTER or maybe QUIT.
>
>Thanks again Craig!
>
>Been there done that.
>I tried the xBase legacy 'RETURN TO MASTER'. And QUIT results in the ubiquitous 'Cannot Quit FoxPro' I tried 'ON SHUTDOWN'...nada.
>
>I have set up the release procedure to return -1. I am calling this from a Delphi app. Everything works fine except when I raise an exception within the server code.
>
>I have an Error Procedure in the class and all it does is go there when there is an error and return to the class that had the error, only to show me the VFP default message. I get my message first then the VFP message. It is nerve racking! All I want is for the error method to return to the calling program a -1 and quit. < heavy sigh >

Maybe I'm missing something but what about
in the init of the form I
errorflag=.f.
on error errorflag=.t.
then
do your code
then
if errorflag=.t.
error stuff method
else
other code
endif
This way works for me.
HTH
Jeff

It's Time to get a gun.

That's what I've been thinkin.

I think I can afford one, If I do a little less Drinkin.

www.TrueGeeks.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform