Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Graceful Exit...
Message
De
04/09/2008 21:37:20
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
04/09/2008 19:24:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01345004
Message ID:
01345031
Vues:
17
>I have an SQL Server App written in FoxPro. I use views to talk to the server. Sometimes clients are accessing the database via a VPN and the VPN connection is not reliable. If they can't reconnect, how can we gracefully exit?
>
>I have the following code:
>
>ON ERROR Do Nothing
>
>* Get Rid of Stupid dialog boxes.
>
>SQLSETPROP(0,'DispWarnings',.F.)
>SQLSETPROP(0,'DispLogin',3)
>
>CLOSE DATABASES
>
>On the above line I get a stupid error message that can only be cleared by ENDING PROCESS on the Application.
>
>Here is the message:
>
>Connectivity error ODBC SQL Server
>SQL Server does not exist or access denied.
>
>Is there a way to gracefully exit when we can't reestablish the network connection?

Loop through all data sessions and within each, through all open aliases (using asessions() then aused()) and tablerevert() each cursor which has buffering, then close it. Tablrevert() all records, not just the current one. You may be stuck because it's trying to release a datasession in which there's an alias with dirty buffers, and it may be trying to complain about it but can't, because you're shutting down.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform