Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server Communication link failure
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01604517
Message ID:
01604597
Views:
42
>>>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
>>
>>What is the exact error (all the aerror entries)? All our errors from SQL Server start with that phrase and then explain the actual error.
>
>The text above (Communication link faulure) is all that I am catching with aerror array.

I re-checked the error mechanism in our program and we put that text ourselves, e.g.
lnRetVal  = sqlexec(.nSQLHandle, lcStack + lcBeginSetRowCount + tcSQLString + lcEndSetRowCount, tcCursor)

              if lnRetVal < 0
                 declare laSqlError[1]
                 lnNumErrors = aerror(laSqlError)   && retrieve the error(s)
                 for lni = 1 to lnNumErrors        && process each error
                     lcMsg = "Communication Link Failure - cannot communicate with the SQL Server from " + this.cServerName + ". " + ;
                             "lnRetVal: " + transform(lnRetVal) + ' ' + laSqlError[lnI, 2]
                     .write_log(trim(lcMsg) + '  SQL Statement: ' + lcSQLLogString, tcCallingProg, 'E')
                     if alltrim(laSqlError[lnI, 4]) = '08S01' and ! tcCallingProg == 'RETRY'
                        * Connection Link Failure!!! - close and re-open connection...
                        .write_log("Setting .lSqlConnError to .T.", program(), '5')
                        .lSQLConnError   = .t.
                        .cSQLConnMSG   = lcMsg
                     endif
                 endfor
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform