Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to capture error for an inaccessible FireBird backen
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Database:
Firebird
Divers
Thread ID:
01197883
Message ID:
01198193
Vues:
16
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform