Skip to Content.
Sympa Menu

freetds - Re: [freetds] [FreeTDS][SQL Server]Communication link failure

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] [FreeTDS][SQL Server]Communication link failure
  • Date: Mon, 24 Sep 2012 23:57:07 -0400

On Mon, 24 Sep 2012 15:03:59 -0300
"Reinaldo A. Fagundes" <reinaldo AT sintesis.com.br> wrote:

> I have a software working well with the unixodbc + freeTDS on MSSQL
> at i lost network conections
> the time out of queries generate exception and when the network come
> back I can't reconect to DB

If the TCP connection is broken, it cannot be re-established.

If your application is timing out -- and the TCP connection is *not*
broken -- it's important to send a cancellation packet and to read all
replies until the cancellation is acknowledged. In ODBC that's done
with SQLCancel.

AFAIK if you get HYT00 or HYT01 from SQLFetch, you still must call
SQLCancel. If it returns SQL_SUCCESS or SQL_SUCCESS_WITH_INFO, the
connection remains valid and can be used.

HTH.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page