Skip site navigation (1) Skip section navigation (2)

Re: BUG #2266: SQL_ATTR_CONNECTION_DEAD always returns SQL_CD_TRUE

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Gerhard Lutz <gerhard(dot)lutz(at)mbtech-group(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2266: SQL_ATTR_CONNECTION_DEAD always returns SQL_CD_TRUE
Date: 2006-02-24 18:50:49
Message-ID: 200602241850.k1OIonU26112@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Please post this to the psqlodbc project.  We don't do odbc support on
this list.

---------------------------------------------------------------------------

Gerhard Lutz wrote:
> 
> The following bug has been logged online:
> 
> Bug reference:      2266
> Logged by:          Gerhard Lutz
> Email address:      gerhard(dot)lutz(at)mbtech-group(dot)com
> PostgreSQL version: 8.1.3
> Operating system:   Windows XP SP2
> Description:        SQL_ATTR_CONNECTION_DEAD always returns SQL_CD_TRUE
> Details: 
> 
> I want to upgrade my PostgreSQL server from 8.0.4 to 8.1.3.
> My C++ application connects to the database via ODBC (ODBC driver:
> PostgreSQL Unicode).
> 
> In 8.0.4 I was able to check after an error if the database connection get
> lost.
> 
> ::SQLGetConnectAttr(g_hDBConnection, SQL_ATTR_CONNECTION_DEAD,
> &uConnectionDead, 0, &nLen);
> 
> returned SQL_CD_TRUE or SQL_CD_FALSE.
> 
> In 8.1.3 this function always returns SQL_CD_TRUE, even when the database
> connection is still available. Has this to do with ODBC 3.5 or is it a bug
> in the ODBC driver?
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
> 

-- 
  Bruce Momjian   http://candle.pha.pa.us
  SRA OSS, Inc.   http://www.sraoss.com

  + If your life is a hard drive, Christ can be your backup. +

In response to

pgsql-bugs by date

Next:From: Bruce MomjianDate: 2006-02-24 18:54:23
Subject: Re: BUG #2268: initdb fails to initialize database cluster with
Previous:From: Bruce MomjianDate: 2006-02-24 12:29:29
Subject: Re: BUG #2257: Can' stop server while autovacuum is running

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group