Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I continue when the network is down?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
How can I continue when the network is down?
Divers
Thread ID:
00109828
Message ID:
00109828
Vues:
70
I have vfp tables on a server / another part of a LAN. I can trap file reading errors when the network goes down, but how can I close my orphaned work areas? CLOSE DATABASES ALL seems to bypass my error handlers. Even this does not work:

PROCEDURE SafelyCloseDatabases
LOCAL oSafe
* issues CLOSE DATABASES ALL and traps any error
oSafe = CREATEOBJECT("DATABASECLOSER")
ENDPROC

DEFINE CLASS DATABASECLOSER AS CUSTOM

* object class to trap its own error condition
* (overrides other error methods)

PROCEDURE Init
CLOSE DATABASES ALL
ENDPROC

PROCEDURE Error
LPARAMETER nError, cMethod, nLine
SET CONSOLE OFF
SET TALK OFF
WAIT "Closing database ..." WIND NOWA
ENDPROC

ENDDEFINE

You would think "DO SafelyCloseDatabases" would handle things well enough, but no luck - an error dialog pops up.

Any suggestions?
John Burton
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform