Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CA RecordRefresh()
Message
De
08/04/2021 16:28:16
Walter Meester
HoogkarspelPays-Bas
 
 
À
08/04/2021 16:08:48
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01679671
Message ID:
01679700
Vues:
39
Sorry I did not answer the question.

>
>			ASQLHANDLES(aSqlhndls)
>			FOR EACH nOdbchdbc IN aSqlhndls
>				=SQLIDLEDISCONNECT(nOdbchdbc)
>			ENDFOR
>
>
>
>Nice trick. A few questions:
>
>1) Where do you put this- in a sqlexec() method or an object error method or ??

As explained in the previous message. Since I use the applic.SQLHandle parameter, it will probe the SQL connection before executing this command.

>2) Would sqldisconnect(0) suffice if you're closing them all?
I don't think so. I never tried.

>3) Do you ask the user whether to keep trying before you terminate the app?- J
Actually, when the application detects the connection is lost, it will throw up a wait window saying "The connection to the database is lost, trying to reconnect". The application becomes none responsive if the click the window and will eventually raise the question whether you still want to wait or quit the application.

I agree, it could be more graceful, but it is not a very common scenario as usually the lost connection is restored in seconds.

>
>Regards, J
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform