Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error handling from form uses wizbase.vcx?

Status
Not open for further replies.

JWilsonny

Programmer
May 8, 2001
46
US
I have a form that sometimes bypasses my error handler in my main prg. Some trapped errors, for instance - a 1705 error, will not go to my code but to wizbase.vcx handler which I see in the debuger trace window. How do I change this so that my form never uses the vcx handler? I assume that it inherited the vcx when I built the form origionally. Thanks

 
Geoff - I,m making some changes for multiuser traps (locking) etc. The error is created by me, on purpose, during testing. Bascially, I am holding the database &MAILFILE open exclusively in another instance and then running my app in another. The form in question uses the wizbase code to trap the error I generate, but I want it to hit my error handler code in my main prg, which handles the conflict, not the wizbase code. I have all the [error event] properties in the form set to (default) which just has the lparameters statement and, of course, my [on error] statement set to hit my code in main prg. When the form hits the error - in this case during the [load] event, a 1705 error is generated from the code (USE &MAILFILE). This, of course, is expected as I have opened &MAILFILE exclusively in another instance. Am I stuck with the wizbase code - or can I change or get rid of it? Thanks.

 
Am I stuck with the wizbase code - or can I change or get rid of it?
If you can find out which parts of your form are relying on wizbase then you could replace those controls with equivalents from your own library.

Another thought - what if you wrap the troublesome bit of code in a TRY..CATCH structure? I'd be very surprised if the handler in wizbase could intercept that.

Geoff Franklin
 
Thanks Geoff - I'll look at the try - catch. I'm not sure how to identify which control is trapping the error to the wizebase code. That's really what the problem is. Thanks.
 
Is there an ON ERROR command somewhere in the vcx? You can use the Code References tool to search for text. Is there code in the Error methods of any of the objects in the Wizbase vcx?

This relates to Geoff's question (my underlining):
Is this an error in your code that's going to the wizbase handler or an error in one of the wizbase classes?
I think what Geoff means is, does the 1705 error occur in one of the methods in one of the objects in the Wizbase vcx or in an object or method that you created yourself?

You should be able to reset the Error methods of wizbase objects to default by right-clicking on the method (copy the code out to a temporary file first). Remember that any Wizbase errors will then go through to your error handler.

You say
I'm not sure how to identify which control is trapping the error
You could try setting a breakpoint just before the troublesome bit of code and step through line by line in the Debugger and see where you end up.

Hope that helps,

Stewart
PS If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Thanks for the responses. I think it is coming from the DE. If I remove the DE and just open the table in the load event - it seems to work. I did check and remove any error event statements also. JW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top