Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error handling
Message
From
30/05/2002 10:20:03
 
 
To
30/05/2002 00:57:03
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00662861
Message ID:
00662988
Views:
13
John, that is a very interesting problem. There are different means of solving it. I do something very similar to you in my system for this purpose.

I have a method for called 'CheckExclusive' in my application object. In that method I first switch the error handler from my normal error handler to a special error handler used only here and that method is called 'ErrorExclusive'.

ON ERROR =oPM.ErrorExclusive()

Then when I cycle through the tables and USE each one of them in EXCLUSIVE mode the special error handler is triggered if one of them won't load. In that special error handler I do only one thing. I record the Error # in a property of that application object.

oPM.ErrorNumber=ERROR()

Then back in the CheckExclusive method after the USE statement I check to see what the error number was or if the table simply didn't load
and then I know it's not exclusive. At the end of the loop I can tell user to fix it.

IF oPM.ErrorNumber=3 OR NOT USED(lcTable)
oPM.ExclusiveOK=.F.
lnHowMany=lnHowMany+1
ENDIF

Simply storing that error number or failure status in a property of a non-visual custom object rather than a variable will solve your problem.

Wally Noll
Previous
Reply
Map
View

Click here to load this message in the networking platform