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:
00097346
Views:
23
>>Donald,
>>
>>The VFP OLE server can't do anything to cause screen I/O. I've got a server based on Form and it just sits in the corner of the screen. I change the form.BackColor to indicate 3 conditions, Ok, Error, Logging. Other than that it's Error() method only calls a udf that uses textmerge to log the error to a file. The methods that the client call all return error state if an error occurs. I don't think you can just shutdown the server, it's the resposibility of the client to get rid of the thing it CreateObjected.
>>
>
>David,
>
>Everyone keeps saying that an OLE Server cannot do screen I/O but I've got messageboxes every where including the Error method. And I too log the errors to a file. I know that the client has to manipulate the server and basically is it's owner. The problem is not actually shutting down so much as cease processing. I instantiate the server at client load and it just sits in process. The client can call any number of methods from the server at any given time. But let's say the client calls a method, and there is an error because one of the tables it needs to wite to is being use exclusively; I want the Error method to be called and the server to stop processing the rest of the calling method code and return to the client a -1. What happens is the Error method is called, the messagebox pops up, the message gets logged, and then...the rest of the code, right after the code that caused the error, proceeds. Even if I call the server's Release method it still returns to finish where
>it left off. MS suggested I use CANCEL in the Error method. I tried that and it kinda works, I can't get the proper return value back to the client. Is there no way to accomplish this?
>
>Oh BTW, thanks for responding.

I'm doing this from an ASP page.
As I said in my early post do the on errorflag and make that flag a property of the form. I also added a killit method to my form that does a thisform.release and clear events. I create from asp createobject(whatever)-- call needed method-- check errorflag and if true call killit method. Works great. But I'm not using any UI in the the server.

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