[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freetds
Subject:    Re: [freetds] [FreeTDS][SQL Server]Communication link failure
From:       "James K. Lowden" <jklowden () freetds ! org>
Date:       2012-09-25 3:57:07
Message-ID: 20120924235707.23118f66.jklowden () freetds ! org
[Download RAW message or body]

On Mon, 24 Sep 2012 15:03:59 -0300
"Reinaldo A. Fagundes" <reinaldo@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
_______________________________________________
FreeTDS mailing list
FreeTDS@lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic