Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server Communication link failure
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01604517
Message ID:
01604574
Vues:
38
>>>>>>Hi,
>>>>>>
>>>>>>Would it be correct to assume that when SQL Select from VFP against SQL Server fails and the error is
>>>>>>
>>>>>>
>>>>>>Communication link failure
>>>>>>
>>>>>>
>>>>>>that the problem was that the SQL Connection timed out by the time user executed the SQL Select? Or if not, what else would be causing this type of error?
>>>>>>
>>>>>>TIA
>>>>>
>>>>>No, when the timeout is occurred then the error will be:
>>>>>"Timeout occurred", something like this.
>>>>>
>>>>>Communication link failure usually means that you do not have connection with SQL Server anymore.
>>>>>Some LAN troubles or if the SQL Server is on WAN maybe Internet connection is lost?
>>>>
>>>>A follow up question, please. Do you think if - on determining that this is the error message - I add a code to try to establish the connection to the SQL Server again?
>>>
>>>Usually before we issue any SQL command we try something that SHOULD return result.
>>>(That is very well stolen from Andy Kramek and Marcia Akins)
>>>
>>>IF SQLEXEC(handler goes here, "SELECT @@IDENTITY","crsTest") < 0
>>>   ** What? we have no connection
>>>   ** do what ever you wish. Quit the Application
>>>   ** try to re-establish connection
>>>ENDIF
>>>
>>
>>Another question (hopefully last in this thread). I found (by looking through many error email messages I received) is that my app sometimes gets error "Communication link failure" on Tableupdate(). The tableupdate() is called to update the SQL Server table via Cursor Adapter. Do you recommend to call the above code (testing connection) before the Tableupdate() too?
>
>Sure, but if you have many CAs and you want to update them at once, just use code above once, not before every CA TableUpdate().

Do I understand that if I call the above "test" code before TableUpdate() and the connection is bad or non-existent, and if I re-create the connection and then execute TableUpdate(), it will work? That is, if the cursor of the Cursor Adapter is created with one handle of SQL connection, and then updated (TableUpdate()) with a different connection handle, it works?
Thank you.
"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