>>>>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)
> for lni = 1 to lnNumErrors
> 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
Thank you. I will see how it could apply to my code.
"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