Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to capture error for an inaccessible FireBird backen
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
Database:
Firebird
Miscellaneous
Thread ID:
01197883
Message ID:
01198193
Views:
17
This message has been marked as the solution to the initial question of the thread.
You still have a global error handler though, maybe on the application level so in in class where connectivity matters you could simply have something like:

Procedure Error(tnError, tcMethod, tnLine)
Return goApplication.oErrorHandler.Error(tnError, tcMethod, tnLine)
EndProc


Define class clsErrorHandler As Session
Procedure Error(tnError, tcMethod, tnLine)
Do Case
Case tnError = LostConnectionerrornumberAAA
doAAAA
Case tnError = LostConnectionerrornumberBBB
doBBB
etc

Otherwise
DoDefault(tnError, tcMethod, tnLine)
EndCase

EndProc
EndDefine

goApplication.oErrorhandler = CreateObject("clsErrorHandler ")


>Hi Mathias
>
>>All non-critical errors go through the error handler don't they?
>>
>>Why not enhance the error handler to trap all such errors?
>
>Guess so. I though that the wheel need not be reinvented as this disconnection problem will be a global one :).
>
>Thanks for your response.
Mathias Banda

Time is longer than a rope.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform