Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CA RecordRefresh()
Message
De
10/04/2021 11:12:44
Walter Meester
HoogkarspelPays-Bas
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01679671
Message ID:
01679749
Vues:
47
>Please help me understand something:
>
>Say you check the SQL Connection (as you indicated) using SQLEXEC(Applic.SQLHandle, "") and then, if it fails,
>you run the code that calls SQLIDLEDISCONNECT(). Here is how I understand it:
>
>
>if SQLEXEC(Applic.SQLHandle, "") < 0
>   ASQLHANDLES(aSqlhndls)
>   FOR EACH nOdbchdbc IN aSqlhndls
>           =SQLIDLEDISCONNECT(nOdbchdbc)
>   ENDFOR
>endif 
>
>
>After the above code, if I understand correctly, all SQL Server connections are disabled. So, the application need to reconnect to the SQL Server.

Not exactly, rather than the connections being broken, they have been set to idle. When the connection is accessed again, whether that is though SQLEXEC(), a CA or Remote View, it will attempt to reconnect again. You can set the connect to never timeout, so it will wait indefinitely for the the connect to come back to live.




>
>Then you say:
>>>Each time a connection fails, you can call a routine with these statements and it will reconnect upon the >>next usage of the connection.
>
>How does the application RECONNECT the CA?




>You also wrote:
>>> If it fails, it will first try to reconnect, after which if succesful would refresh your records just fine.
>
>Again, what I don't understand is how does CA RECONNECT? What specific code RECONNECTs the application to the SQL Server?
>
>TIA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform