Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Testing connection to SQL Server
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01685573
Message ID:
01685628
Vues:
77
Hi,

My application logs almost every failure to connect to the SQL Server. And when such a failure occurs, the program attempts to reconnect using the method suggested by many. The method is:
ASQLHANDLES(aSqlhndls)
    FOR EACH nOdbchdbc IN aSqlhndls
	    	=SQLIDLEDISCONNECT(nOdbchdbc)
    ENDFOR
I find that in majority of the cases, the above method works. But I found (this morning, after adding some more information to the error log), that some condition are never recovered.

The successful recovery happens when the error codes are as follows:
ODBC Error: 10054 Error: [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionWrite (send()).
But the connection is not recovered when the error codes are as follows:
ODBC Error: 0 Error: [Microsoft][ODBC SQL Server Driver]Communication link failure
Does anyone know what the ODBC Error 0 means? Any other suggestions?

TIA
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform